[binutils-gdb] Turn should_stop_exception into a method of ada_catchpoint
Tom Tromey
tromey@sourceware.org
Mon Jun 12 18:13:04 GMT 2023
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=971149cb9a202be08e6c726d48ba7964221552b6
commit 971149cb9a202be08e6c726d48ba7964221552b6
Author: Tom Tromey <tromey@adacore.com>
Date: Thu Feb 16 10:59:34 2023 -0700
Turn should_stop_exception into a method of ada_catchpoint
This turns the should_stop_exception function in ada-lang.c into a
method of ada_catchpoint.
Diff:
---
gdb/ada-lang.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index a7c0ff20d0a..116b215693d 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -12113,6 +12113,12 @@ struct ada_catchpoint : public code_breakpoint
void print_mention () const override;
void print_recreate (struct ui_file *fp) const override;
+ /* A helper function for check_status. Returns true if we should
+ stop for this breakpoint hit. If the user specified a specific
+ exception, we only want to cause a stop if the program thrown
+ that exception. */
+ bool should_stop_exception (const struct bp_location *bl) const;
+
/* The name of the specific exception the user specified. */
std::string excep_string;
@@ -12200,12 +12206,10 @@ ada_catchpoint::allocate_location ()
return new ada_catchpoint_location (this);
}
-/* Returns true if we should stop for this breakpoint hit. If the
- user specified a specific exception, we only want to cause a stop
- if the program thrown that exception. */
+/* See declaration. */
-static bool
-should_stop_exception (const struct bp_location *bl)
+bool
+ada_catchpoint::should_stop_exception (const struct bp_location *bl) const
{
struct ada_catchpoint *c = (struct ada_catchpoint *) bl->owner;
const struct ada_catchpoint_location *ada_loc
More information about the Gdb-cvs
mailing list