Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: ppluzhnikov@google.com (Paul Pluzhnikov)
To: gdb-patches@sourceware.org
Cc: Pedro Alves <pedro@codesourcery.com>, ppluzhnikov@google.com
Subject: [patch] Add missing observer_notify call.
Date: Wed, 22 Jul 2009 20:15:00 -0000	[thread overview]
Message-ID: <20090722193442.C782A76BC0@localhost> (raw)

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


             reply	other threads:[~2009-07-22 19:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22 20:15 Paul Pluzhnikov [this message]
2009-07-22 20:24 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090722193442.C782A76BC0@localhost \
    --to=ppluzhnikov@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox