From c90e7d6352b2e16ac007d08b2e03ae10081147b5 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 24 Apr 2021 19:26:04 -0400 Subject: 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) : Add name parameter. : New field. : Add name parameter, update all callers. Change-Id: Ie0cc4664925215b8d2b09e026011b7803549fba0 --- gdb/linux-thread-db.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gdb/linux-thread-db.c') diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index de8687e..1c6ea4d 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -2028,10 +2028,11 @@ as they are loaded."), &maintenance_show_cmdlist); /* Add ourselves to objfile event chain. */ - gdb::observers::new_objfile.attach (thread_db_new_objfile); + gdb::observers::new_objfile.attach (thread_db_new_objfile, "linux-thread-db"); /* Add ourselves to inferior_created event chain. This is needed to handle debugging statically linked programs where the new_objfile observer won't get called for libpthread. */ - gdb::observers::inferior_created.attach (thread_db_inferior_created); + gdb::observers::inferior_created.attach (thread_db_inferior_created, + "linux-thread-db"); } -- cgit v1.1