aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2019-07-09 19:26:16 +0100
committerPedro Alves <palves@redhat.com>2019-07-09 20:00:07 +0100
commita38118e5d165324b4f9509fd82cf1f1c6421bfc5 (patch)
treed35099288efed6eb392144307dd0bbc76867d26e /gdb/breakpoint.h
parentcb1e4e32c2d9588e1d77ea49bafb5dcdc1cff764 (diff)
downloadgdb-a38118e5d165324b4f9509fd82cf1f1c6421bfc5.zip
gdb-a38118e5d165324b4f9509fd82cf1f1c6421bfc5.tar.gz
gdb-a38118e5d165324b4f9509fd82cf1f1c6421bfc5.tar.bz2
Make "maint info breakpoints" show "catch catch/throw/rethrow" locations
This commit makes "maint info breakpoints" show the internal locations of C++ exception catchpoints: (gdb) info breakpoints Num Type Disp Enb Address What 2 catchpoint keep y exception catch With multiple locations: (gdb) maint info breakpoints Num Type Disp Enb Address What 2 catchpoint keep y exception catch 2.1 y 0x000000000040545f <__cxa_begin_catch+95> inf 1 2.2 y 0x00007ffff71dbe0f <__cxxabiv1::__cxa_begin_catch(void*)+95> inf 1 (gdb) With a single location: (gdb) maint info breakpoints 2 Num Type Disp Enb Address What 2 catchpoint keep y exception catch inf 1 2.1 y 0x00007ffff7bc0b7f <__cxa_begin_catch+95> inf 1 With no locations: (gdb) maint info breakpoints 2 Num Type Disp Enb Address What 2 catchpoint keep y exception catch inf 1 Other catchpoints still show the same way, here a catch signal: (gdb) info breakpoints Num Type Disp Enb Address What 3 catchpoint keep y signal "<standard signals>" (gdb) maint info breakpoints Num Type Disp Enb Address What 3 catchpoint keep y signal "<standard signals>" inf 1 (gdb) Note: I considered making the locations be printed from within breakpoint_ops::print_one(), but gave up given the handling for the broken MI v2 output: /* The mi2 broken format: the main breakpoint tuple ends here, the locations are outside. */ if (!use_fixed_output) bkpt_tuple_emitter.reset (); in print_one_breakpoint. gdb/ChangeLog: 2019-07-09 Pedro Alves <palves@redhat.com> * break-catch-throw.c (is_exception_catchpoint): New. * breakpoint.c (print_one_breakpoint_location): New parameter 'raw_loc'. Handle it. Use is_watchpoint/is_catchpoint/is_exception_catchpoint instead of looking at the breakpoint's type. (print_one_breakpoint): If handling "maint info breakpoints", also print locations of exception catchpoints. * breakpoint.h (is_exception_catchpoint): Declare.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r--gdb/breakpoint.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index bcfa45b..e25acfa 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -872,6 +872,11 @@ extern int is_breakpoint (const struct breakpoint *bpt);
extern int is_watchpoint (const struct breakpoint *bpt);
+/* Return true if BPT is a C++ exception catchpoint (catch
+ catch/throw/rethrow). */
+
+extern bool is_exception_catchpoint (breakpoint *bp);
+
/* An instance of this type is used to represent all kinds of
tracepoints. */