This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Pass the correct argument to the observer in reread_symbols
- From: Tom Tromey <tromey at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 22 Jul 2018 19:28:22 -0000
- Subject: [binutils-gdb] Pass the correct argument to the observer in reread_symbols
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c486b6106a31e442cba13c74a103aad8463bbd20
commit c486b6106a31e442cba13c74a103aad8463bbd20
Author: Tom Tromey <tom@tromey.com>
Date: Sun Jul 8 12:18:09 2018 -0600
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 <tom@tromey.com>
* symfile.c (reread_symbols): Notify iter, not objfile.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/symfile.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5b557a6..a0a388f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2018-07-22 Tom Tromey <tom@tromey.com>
+ * symfile.c (reread_symbols): Notify iter, not objfile.
+
+2018-07-22 Tom Tromey <tom@tromey.com>
+
* ravenscar-thread.c (ravenscar_thread_target::store_registers):
Use arch_ops.
(ravenscar_thread_target::prepare_to_store): Likewise.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 3614aa3..20697d9 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. */