From c486b6106a31e442cba13c74a103aad8463bbd20 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 8 Jul 2018 12:18:09 -0600 Subject: [PATCH] Pass the correct argument to the observer in reread_symbols This is actually a patch I found via another route. Joel had asked me to write a test, but I still have not found the time to do this. Meanwhile, -Wunused-variable also found this error. gdb/ChangeLog 2018-07-22 Tom Tromey * symfile.c (reread_symbols): Notify iter, not objfile. --- gdb/ChangeLog | 4 ++++ gdb/symfile.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5b557a6e8a7..a0a388f166b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2018-07-22 Tom Tromey + + * symfile.c (reread_symbols): Notify iter, not objfile. + 2018-07-22 Tom Tromey * ravenscar-thread.c (ravenscar_thread_target::store_registers): diff --git a/gdb/symfile.c b/gdb/symfile.c index 3614aa3f955..20697d9dca2 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2608,7 +2608,7 @@ reread_symbols (void) gdb::observers::new_objfile.notify (NULL) has been called by clear_symtab_users above. Notify the new files now. */ for (auto iter : new_objfiles) - gdb::observers::new_objfile.notify (objfile); + gdb::observers::new_objfile.notify (iter); /* At least one objfile has changed, so we can consider that the executable we're debugging has changed too. */ -- 2.30.2