This is the mail archive of the gdb-patches@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]

[patch] Add missing observer_notify call.


Greetings,

In http://sourceware.org/ml/gdb-patches/2009-07/msg00553.html
Pedro noticed that a new objfile may be created without notifying new_objfile
observer.

Here is a fix. Tested on Linux/x86_64 with no new failures.

Thanks,
--
Paul Pluzhnikov


2009-07-22  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* symfile.c (symbol_file_add_with_addrs_or_offsets): Call observer.

Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.238
diff -u -p -u -r1.238 symfile.c
--- symfile.c	22 Jul 2009 19:21:31 -0000	1.238
+++ symfile.c	22 Jul 2009 19:26:12 -0000
@@ -1080,7 +1080,10 @@ symbol_file_add_with_addrs_or_offsets (b
   do_cleanups (my_cleanups);
 
   if (objfile->sf == NULL)
-    return objfile;	/* No symbols. */
+    {
+      observer_notify_new_objfile (objfile);
+      return objfile;	/* No symbols. */
+    }
 
   new_symfile_objfile (objfile, add_flags);
 


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