aboutsummaryrefslogtreecommitdiff
path: root/binutils/rddbg.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-04-16 17:53:58 +0000
committerIan Lance Taylor <ian@airs.com>1996-04-16 17:53:58 +0000
commitf32fb3fd1fb24d8d72ba1abe43ec8cfd0cf4a89d (patch)
treebbc118de3d84433c62a7a7ce5721816fe45d5469 /binutils/rddbg.c
parenta2d914e15e2bbc5e29a7deab1b6dab999556f0e3 (diff)
downloadgdb-f32fb3fd1fb24d8d72ba1abe43ec8cfd0cf4a89d.zip
gdb-f32fb3fd1fb24d8d72ba1abe43ec8cfd0cf4a89d.tar.gz
gdb-f32fb3fd1fb24d8d72ba1abe43ec8cfd0cf4a89d.tar.bz2
* rdcoff.c: New file.
* rddbg.c (read_debugging_info): Read COFF symbols if COFF flavour and no stabs were found. * budbg.h (parse_coff): Declare. * Makefile.in: Rebuild dependencies. (CFILES): Add rdcoff.c. (DEBUG_OBJS): Add rdcoff.o.
Diffstat (limited to 'binutils/rddbg.c')
-rw-r--r--binutils/rddbg.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/binutils/rddbg.c b/binutils/rddbg.c
index d42d048..b2602af 100644
--- a/binutils/rddbg.c
+++ b/binutils/rddbg.c
@@ -54,8 +54,6 @@ read_debugging_info (abfd, syms, symcount)
if (dhandle == NULL)
return NULL;
- /* All we know about right now is stabs. */
-
if (! read_section_stabs_debugging_info (abfd, syms, symcount, dhandle,
&found))
return NULL;
@@ -73,6 +71,17 @@ read_debugging_info (abfd, syms, symcount)
return NULL;
}
+ /* Try reading the COFF symbols if we didn't find any stabs in COFF
+ sections. */
+ if (! found
+ && bfd_get_flavour (abfd) == bfd_target_coff_flavour
+ && symcount > 0)
+ {
+ if (! parse_coff (abfd, syms, symcount, dhandle))
+ return NULL;
+ found = true;
+ }
+
if (! found)
{
fprintf (stderr, "%s: no recognized debugging information\n",