From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1551) id 125AB3830883; Fri, 20 May 2022 19:43:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 125AB3830883 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Pedro Alves To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Make ada_catchpoint_location's owner ctor parameter be ada_catchpoint X-Act-Checkin: binutils-gdb X-Git-Author: Pedro Alves X-Git-Refname: refs/heads/master X-Git-Oldrev: 3b003a6126610d16015c5aee997ed702788d3be6 X-Git-Newrev: 8cd0bf5e7ef0a837969e39341a6d597f0eca3809 Message-Id: <20220520194314.125AB3830883@sourceware.org> Date: Fri, 20 May 2022 19:43:14 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2022 19:43:14 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8cd0bf5e7ef0= a837969e39341a6d597f0eca3809 commit 8cd0bf5e7ef0a837969e39341a6d597f0eca3809 Author: Pedro Alves Date: Sat May 7 00:16:52 2022 +0100 Make ada_catchpoint_location's owner ctor parameter be ada_catchpoint =20 This commit changes ada_catchpoint_location's ctor from: =20 ada_catchpoint_location (breakpoint *owner) =20 to: =20 ada_catchpoint_location (ada_catchpoint *owner) =20 just to make the code better document intention. =20 To do this, we need to move the ada_catchpoint_location type's definition to after ada_catchpoint is defined, otherwise the compiler doesn't know that ada_catchpoint is convertible to struct breakpoint. =20 Change-Id: Id908b2e38bde30b262381e00c5637adb9bf0129d Diff: --- gdb/ada-lang.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 248b847cfbc..1c70f4178d0 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -12102,22 +12102,6 @@ static std::string ada_exception_catchpoint_cond_s= tring exception, in order to be able to re-set the condition expression when symbols change. */ =20 -/* An instance of this type is used to represent an Ada catchpoint - breakpoint location. */ - -class ada_catchpoint_location : public bp_location -{ -public: - ada_catchpoint_location (breakpoint *owner) - : bp_location (owner, bp_loc_software_breakpoint) - {} - - /* The condition that checks whether the exception that was raised - is the specific exception the user specified on catchpoint - creation. */ - expression_up excep_cond_expr; -}; - /* An instance of this type is used to represent an Ada catchpoint. */ =20 struct ada_catchpoint : public base_breakpoint @@ -12144,6 +12128,22 @@ struct ada_catchpoint : public base_breakpoint enum ada_exception_catchpoint_kind m_kind; }; =20 +/* An instance of this type is used to represent an Ada catchpoint + breakpoint location. */ + +class ada_catchpoint_location : public bp_location +{ +public: + explicit ada_catchpoint_location (ada_catchpoint *owner) + : bp_location (owner, bp_loc_software_breakpoint) + {} + + /* The condition that checks whether the exception that was raised + is the specific exception the user specified on catchpoint + creation. */ + expression_up excep_cond_expr; +}; + /* Parse the exception condition string in the context of each of the catchpoint's locations, and store them for later evaluation. */