summaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-02-01 19:38:59 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-02-01 19:38:59 +0000
commit848a873ee947a94838a68d219f211de23aeea96b (patch)
tree3dd8284db951aa8758f30f6356cfcd52dda61763 /gdb/symfile.c
parent9027410698dbc498f44441201784578570a0a6f6 (diff)
downloadgdb-848a873ee947a94838a68d219f211de23aeea96b.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);