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/auto-load.c | |
parent | ec098003e27d67bca9e9880320e26ab8ad30fe31 (diff) | |
download | binutils-c90e7d6352b2e16ac007d08b2e03ae10081147b5.zip binutils-c90e7d6352b2e16ac007d08b2e03ae10081147b5.tar.gz binutils-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/auto-load.c')
-rw-r--r-- | gdb/auto-load.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/auto-load.c b/gdb/auto-load.c index 1dfcf21..239efa3 100644 --- a/gdb/auto-load.c +++ b/gdb/auto-load.c @@ -1503,7 +1503,7 @@ _initialize_auto_load () char *guile_name_help; const char *suffix; - gdb::observers::new_objfile.attach (auto_load_new_objfile); + gdb::observers::new_objfile.attach (auto_load_new_objfile, "auto-load"); add_setshow_boolean_cmd ("gdb-scripts", class_support, &auto_load_gdb_scripts, _("\ @@ -1613,7 +1613,8 @@ This option has security implications for untrusted inferiors."), show_auto_load_safe_path, auto_load_set_cmdlist_get (), auto_load_show_cmdlist_get ()); - gdb::observers::gdb_datadir_changed.attach (auto_load_gdb_datadir_changed); + gdb::observers::gdb_datadir_changed.attach (auto_load_gdb_datadir_changed, + "auto-load"); cmd = add_cmd ("add-auto-load-safe-path", class_support, add_auto_load_safe_path, |