From patchwork Fri Jan 11 14:22:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 31035 Received: (qmail 48623 invoked by alias); 11 Jan 2019 14:23:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 48578 invoked by uid 89); 11 Jan 2019 14:23:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=ada-lang.c, UD:ada-lang.c, adalangc, Hx-languages-length:1864 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Jan 2019 14:23:03 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7FDD611795D; Fri, 11 Jan 2019 09:23:02 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zdj1kzfCBjik; Fri, 11 Jan 2019 09:23:02 -0500 (EST) Received: from tron.gnat.com (tron.gnat.com [205.232.38.10]) by rock.gnat.com (Postfix) with ESMTP id 70D8D11795C; Fri, 11 Jan 2019 09:23:02 -0500 (EST) Received: by tron.gnat.com (Postfix, from userid 4233) id 6B3B735C5; Fri, 11 Jan 2019 09:23:02 -0500 (EST) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Eli Zaretskii Subject: [RFA/doco] expand a bit the in-GDB help for the "catch exception" help text Date: Fri, 11 Jan 2019 09:22:51 -0500 Message-Id: <1547216571-27971-1-git-send-email-brobecker@adacore.com> Hello, One of our users remarked that the help doesn't mention the fact that the "catch exception" supports the special argument "unhandled" to catch exceptions which do not have a handler. This patch changes the output of... | (gdb) help catch exception | Catch Ada exceptions, when raised. | With an argument, catch only exceptions with the given name. ... to ... | (gdb) help catch exception | Catch Ada exceptions, when raised. | Usage: catch exception [ ARG ] | | Without any argument, stop when any Ada exception is raised. | If ARG is "unhandled" (without the quotes), stop when an unhandledis raised. | Otherwise, the catchpoint only stops when the name of the exception being | raised is the same as ARG. gdb/ChangeLog: * ada-lang.c (_initialize_ada_language): Expand the help text for the "catch exception" command. Tested on x86_64-linux, no regression. OK to push? Or any suggestions? Thank you, diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index f552f13..dbd258a 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -14508,7 +14508,14 @@ overloads selection menu is activated"), add_catch_command ("exception", _("\ Catch Ada exceptions, when raised.\n\ -With an argument, catch only exceptions with the given name."), +Usage: catch exception [ ARG ]\n\ +\n\ +Without any argument, stop when any Ada exception is raised.\n\ +If ARG is \"unhandled\" (without the quotes), only stop when the exception\n\ +being raised does not have a handler (and will therefore lead to the task's\n\ +termination).\n\ +Otherwise, the catchpoint only stops when the name of the exception being\n\ +raised is the same as ARG."), catch_ada_exception_command, NULL, CATCH_PERMANENT,