diff options
author | Christopher Faylor <me+cygwin@cgf.cx> | 2003-02-20 03:12:46 +0000 |
---|---|---|
committer | Christopher Faylor <me+cygwin@cgf.cx> | 2003-02-20 03:12:46 +0000 |
commit | 1b6bc7e06fbe55f437785412af8c56b741c1a46d (patch) | |
tree | 800fc0d8e9f9272cf4d29cb23986ec44952ec5ad /gdb/coffread.c | |
parent | 65279b928e4b1774d37fb2975015b347a37eae96 (diff) | |
download | gdb-1b6bc7e06fbe55f437785412af8c56b741c1a46d.zip gdb-1b6bc7e06fbe55f437785412af8c56b741c1a46d.tar.gz gdb-1b6bc7e06fbe55f437785412af8c56b741c1a46d.tar.bz2 |
* coff-pe-read.c: New file - support reading of minimal symbols from a portable
executable using the export table.
* coff-pe-read.h: New file.
* coffread.c: Include coff-pe-read.h.
(coff_symtab_read): Call read_pe_exported_syms iff no recognized debugging
symbols found.
* Makefile.in (SFILES): Add coff-pe-read.o.
(coff_pe_read_h): Define.
(COMMON_OBS): Add coff-pe-read.o.
(coffread.o): Add coff_pe_read_h dependency.
(coff-pe-read.o): New target.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r-- | gdb/coffread.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c index c2f140b..912943c 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -46,6 +46,8 @@ #include "gdb_assert.h" #include "block.h" +#include "coff-pe-read.h" + extern void _initialize_coffread (void); struct coff_symfile_info @@ -1087,6 +1089,13 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, } } + if ((nsyms == 0) && (pe_file)) + { + /* We've got no debugging symbols, but it's is a portable + executable, so try to read the export table */ + read_pe_exported_syms (objfile); + } + if (last_source_file) coff_end_symtab (objfile); |