This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/gdb-8.2-branch] Pass the correct argument to the observer in reread_symbols


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=80860e6dad00190660c49b60bbbefee1648a46e2

commit 80860e6dad00190660c49b60bbbefee1648a46e2
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.
    
    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 e2cf7fc..6ed5e8e 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 48eca5c..29cd485 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.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]