]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
patch ../102429642.patch
authorDoug Evans <dje@google.com>
Thu, 10 Dec 2015 20:00:31 +0000 (12:00 -0800)
committerDoug Evans <dje@google.com>
Thu, 10 Dec 2015 20:00:31 +0000 (12:00 -0800)
README.google
gdb/symfile.c

index a593939bb1e4ee9b5189fcbaf32ecff1fd0c2a1f..4a92ff13f0534302211fcfffd767a41c9824d7c8 100644 (file)
@@ -230,3 +230,15 @@ they are an ongoing maintenance burden.
 +      Ref: 15188412
 +      * breakpoint.c (create_solib_event_breakpoint): Apply
 +      gdbarch_skip_entrypoint if it's defined.
+--- README.google      2015-09-05 18:23:16.000000000 -0700
++++ README.google      2015-09-05 18:26:36.000000000 -0700
++
++2015-09-05  Doug Evans  <google.com>
++
++      PR python/17936
++      * symfile.c (symbol_file_add_with_addrs): Call
++      observer_notify_new_objfile (NULL) early, before loading symbols.
++      (symbol_file_add_separate): Turn off SYMFILE_MAINLINE when loading
++      separate debug files.
++      (clear_symtab_users): Don't call observer_notify_new_objfile (NULL)
++      here if SYMFILE_MAINLINE.
index 7cc475eafa984c4b1a7f82db75248fa95c4417ac..7a5554f9e4ace1d36fc03d9324738fe6d40c50d9 100644 (file)
@@ -1191,6 +1191,15 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name, int add_flags,
       && !query (_("Load new symbol table from \"%s\"? "), name))
     error (_("Not confirmed."));
 
+  /* If mainline, send the new_objfile (NULL) notification now.
+     This is done here so that clients will see one event instead of one for
+     the main objfile and a second one for a possible separate debug file, and
+     will see the event before any objfiles are loaded including possible
+     separate debug files. Note that if there is a separate debug file, we
+     will end up back here from calling syms_from_objfile below.  PR 17936.  */
+  if (mainline)
+    observer_notify_new_objfile (NULL);
+
   objfile = allocate_objfile (abfd, name,
                              flags | (mainline ? OBJF_MAINLINE : 0));
 
@@ -1284,7 +1293,7 @@ symbol_file_add_separate (bfd *bfd, const char *name, int symfile_flags,
   my_cleanup = make_cleanup_free_section_addr_info (sap);
 
   new_objfile = symbol_file_add_with_addrs
-    (bfd, name, symfile_flags, sap,
+    (bfd, name, symfile_flags & ~SYMFILE_MAINLINE, sap,
      objfile->flags & (OBJF_REORDERED | OBJF_SHARED | OBJF_READNOW
                       | OBJF_USERLOADED),
      objfile);
@@ -3030,7 +3039,11 @@ clear_symtab_users (int add_flags)
   clear_displays ();
   clear_last_displayed_sal ();
   clear_pc_function_cache ();
-  observer_notify_new_objfile (NULL);
+
+  /* If this is the main objfile, the notification is sent out sooner,
+     by symbol_file_add_with_addrs.  PR 17936.  */
+  if ((add_flags & SYMFILE_MAINLINE) == 0)
+    observer_notify_new_objfile (NULL);
 
   /* Clear globals which might have pointed into a removed objfile.
      FIXME: It's not clear which of these are supposed to persist