aboutsummaryrefslogtreecommitdiff
path: root/gdb/coffread.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2009-12-09 13:44:53 +0000
committerTristan Gingold <gingold@adacore.com>2009-12-09 13:44:53 +0000
commit9cce227f8cd3081662b208e0067b23547afa5a83 (patch)
tree2676c5beecce6799109ec44556afd63f02fc6e68 /gdb/coffread.c
parentbe6f64938f985dfb0eaa2107b99f193bb865ce04 (diff)
downloadgdb-9cce227f8cd3081662b208e0067b23547afa5a83.zip
gdb-9cce227f8cd3081662b208e0067b23547afa5a83.tar.gz
gdb-9cce227f8cd3081662b208e0067b23547afa5a83.tar.bz2
2009-12-02 Tristan Gingold <gingold@adacore.com>
* symfile.h (symbol_file_add_separate): New prototype. (find_separate_debug_file_by_buildid): Ditto. (find_separate_debug_file_by_debuglink): Ditto. * symfile.c (reread_separate_symbols): Remove. (find_separate_debug_file): Split into ... (find_separate_debug_file_by_buildid): ... this and ... (find_separate_debug_file_by_debuglink): ... this. (symbol_file_add_with_addrs_or_offsets): Do not save orig_addrs. Remove separate debug file handling. (symbol_file_add_separate): New function. (reread_symbols): Do not considere separate debug files, but free them while handling their parent. Reindent. * coffread.c (coff_symfile_read): Handle separate object file. * elfread.c (elf_symfile_read): Ditto.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r--gdb/coffread.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 3f5ff96..58f5337 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -637,6 +637,21 @@ coff_symfile_read (struct objfile *objfile, int symfile_flags)
dwarf2_build_frame_info (objfile);
+ /* Try to add separate debug file if no symbols table found. */
+ if (!objfile_has_partial_symbols (objfile))
+ {
+ char *debugfile;
+
+ debugfile = find_separate_debug_file_by_debuglink (objfile);
+
+ if (debugfile)
+ {
+ bfd *abfd = symfile_bfd_open (debugfile);
+ symbol_file_add_separate (abfd, symfile_flags, objfile);
+ xfree (debugfile);
+ }
+ }
+
do_cleanups (back_to);
}