diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-04-24 19:26:04 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-04-24 19:26:41 -0400 |
commit | c90e7d6352b2e16ac007d08b2e03ae10081147b5 (patch) | |
tree | 2ca6bb8a1d338ff48f2eed24dcb25300e4204f54 /gdb/breakpoint.c | |
parent | ec098003e27d67bca9e9880320e26ab8ad30fe31 (diff) | |
download | gdb-c90e7d6352b2e16ac007d08b2e03ae10081147b5.zip gdb-c90e7d6352b2e16ac007d08b2e03ae10081147b5.tar.gz gdb-c90e7d6352b2e16ac007d08b2e03ae10081147b5.tar.bz2 |
gdbsupport, gdb: give names to observers
Give a name to each observer, this will help produce more meaningful
debug message.
gdbsupport/ChangeLog:
* observable.h (class observable) <struct observer> <observer>:
Add name parameter.
<name>: New field.
<attach>: Add name parameter, update all callers.
Change-Id: Ie0cc4664925215b8d2b09e026011b7803549fba0
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index a20464a..9cc53f8 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -15646,9 +15646,12 @@ _initialize_breakpoint () initialize_breakpoint_ops (); - gdb::observers::solib_unloaded.attach (disable_breakpoints_in_unloaded_shlib); - gdb::observers::free_objfile.attach (disable_breakpoints_in_freed_objfile); - gdb::observers::memory_changed.attach (invalidate_bp_value_on_memory_change); + gdb::observers::solib_unloaded.attach (disable_breakpoints_in_unloaded_shlib, + "breakpoint"); + gdb::observers::free_objfile.attach (disable_breakpoints_in_freed_objfile, + "breakpoint"); + gdb::observers::memory_changed.attach (invalidate_bp_value_on_memory_change, + "breakpoint"); breakpoint_chain = 0; /* Don't bother to call set_breakpoint_count. $bpnum isn't useful @@ -16232,6 +16235,8 @@ This is useful for formatted output in user-defined commands.")); automatic_hardware_breakpoints = true; - gdb::observers::about_to_proceed.attach (breakpoint_about_to_proceed); - gdb::observers::thread_exit.attach (remove_threaded_breakpoints); + gdb::observers::about_to_proceed.attach (breakpoint_about_to_proceed, + "breakpoint"); + gdb::observers::thread_exit.attach (remove_threaded_breakpoints, + "breakpoint"); } |