diff options
author | Doug Evans <dje@google.com> | 2015-12-10 12:00:31 -0800 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2015-12-10 12:00:31 -0800 |
commit | 99a8e537841025daa212aa33e08cfdebc82c27ee (patch) | |
tree | b749a0430a5116b1e18db7a55b7b7b2d383ef07b | |
parent | 1ccb4ed47ff9b703ca32f020f939b42c4d0ee355 (diff) | |
download | fsf-binutils-gdb-99a8e537841025daa212aa33e08cfdebc82c27ee.zip fsf-binutils-gdb-99a8e537841025daa212aa33e08cfdebc82c27ee.tar.gz fsf-binutils-gdb-99a8e537841025daa212aa33e08cfdebc82c27ee.tar.bz2 |
patch ../102429642.patch
-rw-r--r-- | README.google | 12 | ||||
-rw-r--r-- | gdb/symfile.c | 17 |
2 files changed, 27 insertions, 2 deletions
diff --git a/README.google b/README.google index a593939..4a92ff1 100644 --- a/README.google +++ b/README.google @@ -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. diff --git a/gdb/symfile.c b/gdb/symfile.c index 7cc475e..7a5554f 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -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 |