diff options
author | Doug Evans <dje@google.com> | 2011-10-11 03:31:59 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2011-10-11 03:31:59 +0000 |
commit | 0838fb575ec286250d500871c0a078e6bd25eacc (patch) | |
tree | b6a69b5f042414edf107215fbb04b954362f0f43 /gdb/symfile.c | |
parent | 0344e8789041c41c4561cfd54c4b04e512983fb4 (diff) | |
download | fsf-binutils-gdb-0838fb575ec286250d500871c0a078e6bd25eacc.zip fsf-binutils-gdb-0838fb575ec286250d500871c0a078e6bd25eacc.tar.gz fsf-binutils-gdb-0838fb575ec286250d500871c0a078e6bd25eacc.tar.bz2 |
* linux-thread-db.c (thread_db_new_objfile): Only try to load
libthread_db when we load libpthread or the main symbol file.
(thread_db_inferior_created): New function.
(_initialize_thread_db): Attach inferior_created observer.
* linux-nat.c (linux_child_post_attach): Remove call to
check_for_thread_db.
(linux_child_post_startup_inferior): Ditto.
* objfiles.h (OBJF_MAINLINE): Define.
* symfile.c (symbol_file_add_with_addrs_or_offsets): Pass it to
allocate_objfile when appropriate.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index 1540cb7..5c4906f 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1081,6 +1081,7 @@ symbol_file_add_with_addrs_or_offsets (bfd *abfd, struct cleanup *my_cleanups; const char *name = bfd_get_filename (abfd); const int from_tty = add_flags & SYMFILE_VERBOSE; + const int mainline = add_flags & SYMFILE_MAINLINE; const int should_print = ((from_tty || info_verbose) && (readnow_symbol_files || (add_flags & SYMFILE_NO_READ) == 0)); @@ -1097,12 +1098,12 @@ symbol_file_add_with_addrs_or_offsets (bfd *abfd, interactively wiping out any existing symbols. */ if ((have_full_symbols () || have_partial_symbols ()) - && (add_flags & SYMFILE_MAINLINE) + && mainline && from_tty && !query (_("Load new symbol table from \"%s\"? "), name)) error (_("Not confirmed.")); - objfile = allocate_objfile (abfd, flags); + objfile = allocate_objfile (abfd, flags | (mainline ? OBJF_MAINLINE : 0)); discard_cleanups (my_cleanups); if (parent) |