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/cli/cli-interp.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/cli/cli-interp.c')
-rw-r--r-- | gdb/cli/cli-interp.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c index 882384e..31fe934 100644 --- a/gdb/cli/cli-interp.c +++ b/gdb/cli/cli-interp.c @@ -482,14 +482,16 @@ _initialize_cli_interp () interp_factory_register (INTERP_CONSOLE, cli_interp_factory); /* If changing this, remember to update tui-interp.c as well. */ - gdb::observers::normal_stop.attach (cli_on_normal_stop); - gdb::observers::end_stepping_range.attach (cli_on_end_stepping_range); - gdb::observers::signal_received.attach (cli_on_signal_received); - gdb::observers::signal_exited.attach (cli_on_signal_exited); - gdb::observers::exited.attach (cli_on_exited); - gdb::observers::no_history.attach (cli_on_no_history); - gdb::observers::sync_execution_done.attach (cli_on_sync_execution_done); - gdb::observers::command_error.attach (cli_on_command_error); + gdb::observers::normal_stop.attach (cli_on_normal_stop, "cli-interp"); + gdb::observers::end_stepping_range.attach (cli_on_end_stepping_range, + "cli-interp"); + gdb::observers::signal_received.attach (cli_on_signal_received, "cli-interp"); + gdb::observers::signal_exited.attach (cli_on_signal_exited, "cli-interp"); + gdb::observers::exited.attach (cli_on_exited, "cli-interp"); + gdb::observers::no_history.attach (cli_on_no_history, "cli-interp"); + gdb::observers::sync_execution_done.attach (cli_on_sync_execution_done, + "cli-interp"); + gdb::observers::command_error.attach (cli_on_command_error, "cli-interp"); gdb::observers::user_selected_context_changed.attach - (cli_on_user_selected_context_changed); + (cli_on_user_selected_context_changed, "cli-interp"); } |