public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Make ada_catchpoint_location's owner ctor parameter be ada_catchpoint
@ 2022-05-20 19:43 Pedro Alves
0 siblings, 0 replies; only message in thread
From: Pedro Alves @ 2022-05-20 19:43 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8cd0bf5e7ef0a837969e39341a6d597f0eca3809
commit 8cd0bf5e7ef0a837969e39341a6d597f0eca3809
Author: Pedro Alves <pedro@palves.net>
Date: Sat May 7 00:16:52 2022 +0100
Make ada_catchpoint_location's owner ctor parameter be ada_catchpoint
This commit changes ada_catchpoint_location's ctor from:
ada_catchpoint_location (breakpoint *owner)
to:
ada_catchpoint_location (ada_catchpoint *owner)
just to make the code better document intention.
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.
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_string
exception, in order to be able to re-set the condition expression
when symbols change. */
-/* 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. */
struct ada_catchpoint : public base_breakpoint
@@ -12144,6 +12128,22 @@ struct ada_catchpoint : public base_breakpoint
enum ada_exception_catchpoint_kind m_kind;
};
+/* 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. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-20 19:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 19:43 [binutils-gdb] Make ada_catchpoint_location's owner ctor parameter be ada_catchpoint Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).