From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114112 invoked by alias); 21 Dec 2017 11:52:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 114008 invoked by uid 89); 21 Dec 2017 11:52:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-7.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:1513788, H*f:sk:1513788, H*i:sk:1513788 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; Thu, 21 Dec 2017 11:52:39 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BB03E1171BA; Thu, 21 Dec 2017 06:52:37 -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 uZfpEuG2xNSz; Thu, 21 Dec 2017 06:52:37 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 48AF61171B9; Thu, 21 Dec 2017 06:52:37 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id D5843809B4; Thu, 21 Dec 2017 15:52:32 +0400 (+04) Date: Thu, 21 Dec 2017 11:52:00 -0000 From: Joel Brobecker To: Xavier Roirand Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v3] (Ada) New command to stop at start of exception handler. Message-ID: <20171221115232.kvoudxpr2ojyxpdk@adacore.com> References: <1513788893-3802-1-git-send-email-roirand@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1513788893-3802-1-git-send-email-roirand@adacore.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2017-12/txt/msg00470.txt.bz2 Hi Xavier, Still some comments... See below: > gdb/ChangeLog: > > * ada-lang.h (ada_exception_catchpoint_kind) : > Add field. > * ada-lang.c (struct exception_support_info) : > Add field. > (default_exception_support_info) : Add field. > (exception_support_info_fallback) : Add field. > (ada_exception_name_addr_1): Add "catch handlers" handling. > (ada_exception_catchpoint_cond_string) : New parameter. > Update all callers. > (create_excep_cond_exprs) : Add parameter. > (re_set_exception): Update create_excep_cond_exprs call. > (print_it_exception, print_one_exception, print_mention_exception) > (print_recreate_exception): Add "catch handler" handling. > (allocate_location_catch_handlers, re_set_catch_handlers) > (check_status_catch_handlers, print_it_catch_handlers) > (print_one_catch_handlers, print_mention_catch_handlers) > (print_recreate_catch_handlers): New function. > (struct breakpoint_ops) : New > variable. There is some confusion as to the purpose of <...> and [...]. Can you review the following description in the GNU Coding Standards, maybe they will explain it better than me: https://www.gnu.org/prep/standards/standards.html#Change-Logs In the meantime, what you are saying above is: *IN* struct breapoint_ops, the part that you changed is "catch_handlers_breakpoint_ops", and that part is a new variable. What you want to do is that you created a new variable named "catch_handlers_breakpoint_ops". Therefore: (catch_handlers_breakpoint_ops): New variable. > gdb/doc/ChangeLog: > > * gdb.textinfo (Set Catchpoints): Add documentation for You forgot to fix the name of the file (textinfo -> texinfo). > new "catch handlers" action. > @@ -13022,12 +13112,15 @@ ada_get_next_arg (const char **argsp) > Set EX to the appropriate catchpoint type. > Set EXCEP_STRING to the name of the specific exception if > specified by the user. > + IS_CATCH_HANDLERS_CMD: True if the arguments are for a > + "catch handle" command. False otherwise. "catch handle" -> "catch handlers". > @@ -4458,6 +4458,26 @@ called @code{Constraint_Error} is defined in package @code{Pck}, then > the command to use to catch such exceptions is @kbd{catch exception > Pck.Constraint_Error}. > > +@item handlers > +@kindex catch handlers > +@cindex Ada exception handlers catching > +@cindex catch Ada exceptions when handled > +An Ada exception being handled. If an exception name is > +specified at the end of the command > + (eg @kbd{catch handlers Program_Error}), the debugger will stop > +only when this specific exception is handled. > +Otherwise, the debugger stops execution when any Ada exception is handled. > + > +When inserting an handlers catchpoint on a user-defined "an handlers" -> "a handlers" > +################################################################ > +# 4. Try catching with condition and named exception handlers. # > +################################################################ > + > +# Insert a catchpoint on Program_Error Ada exception handlers with > +# condition. > + > +gdb_test "catch handlers Program_Error if Global_Var = 4" \ > + "Catchpoint $decimal: `Program_Error' Ada exception handlers" \ > + "insert catchpoint on Program_Error Ada exception handlers with condition" Formatting (> 80 chars) -- Joel