Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Add missing observer_notify call.
@ 2009-07-22 20:15 Paul Pluzhnikov
  2009-07-22 20:24 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Pluzhnikov @ 2009-07-22 20:15 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pedro Alves, ppluzhnikov

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);
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-22 19:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-22 20:15 [patch] Add missing observer_notify call Paul Pluzhnikov
2009-07-22 20:24 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox