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
This commit is contained in:
Simon Marchi 2021-04-24 19:26:04 -04:00
parent ec098003e2
commit c90e7d6352
47 changed files with 219 additions and 149 deletions

View file

@ -607,7 +607,8 @@ _initialize_break_catch_syscall ()
{
initialize_syscall_catchpoint_ops ();
gdb::observers::inferior_exit.attach (clear_syscall_counts);
gdb::observers::inferior_exit.attach (clear_syscall_counts,
"break-catch-syscall");
add_catch_command ("syscall", _("\
Catch system calls by their names, groups and/or numbers.\n\