summaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-02-01 19:39:04 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-02-01 19:39:04 +0000
commit8a92335bfca80cc9b4cd217505ea0dcbfdefbf07 (patch)
tree1a2727b6fdead4c6894d9cdefc072b0d04fcd1bc /gdb/symfile.c
parent17f2157dcc39cd6c5786ba70dd130e858728f1ac (diff)
downloadbinutils-gdb-8a92335bfca80cc9b4cd217505ea0dcbfdefbf07.tar.gz
gdb/
* elfread.c (elf_symfile_read): Limit separate debug info additions to files with no separate debug info. * objfiles.c (add_separate_debug_objfile): Add gdb_assert calls. * symfile.c (read_symbols): Call find_separate_debug_file_in_section only for files with no separate debug info. gdb/testsuite/ * gdb.base/gnu-debugdata.exp): Create ${binfile}.debug, ${binfile}.mini_debuginfo-debuglink, add -k to xz, use now ${binfile}.mini_debuginfo-debuglink and ${binfile}.mini_debuginfo-debuglink.xz.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 63bf3295d7f..6f968b7abd8 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -823,7 +823,12 @@ static void
read_symbols (struct objfile *objfile, int add_flags)
{
(*objfile->sf->sym_read) (objfile, add_flags);
- if (!objfile_has_partial_symbols (objfile))
+
+ /* find_separate_debug_file_in_section should be called only if there is
+ single binary with no existing separate debug info file. */
+ if (!objfile_has_partial_symbols (objfile)
+ && objfile->separate_debug_objfile == NULL
+ && objfile->separate_debug_objfile_backlink == NULL)
{
bfd *abfd = find_separate_debug_file_in_section (objfile);
struct cleanup *cleanup = make_cleanup_bfd_unref (abfd);