* 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.
This commit is contained in:
Christopher Faylor
2003-02-20 03:12:46 +00:00
parent 65279b928e
commit 1b6bc7e06f
5 changed files with 408 additions and 7 deletions

View File

@@ -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);