2003-02-20 11:12:46 +08:00
|
|
|
/* Interface to coff-pe-read.c (portable-executable-specific symbol reader).
|
|
|
|
|
2017-01-01 14:50:51 +08:00
|
|
|
Copyright (C) 2003-2017 Free Software Foundation, Inc.
|
2003-02-20 11:12:46 +08:00
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-08-24 02:08:50 +08:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
2003-02-20 11:12:46 +08:00
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2007-08-24 02:08:50 +08:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2003-02-20 11:12:46 +08:00
|
|
|
|
2011-01-08 03:36:19 +08:00
|
|
|
Contributed by Raoul M. Gough (RaoulGough@yahoo.co.uk). */
|
2003-02-20 11:12:46 +08:00
|
|
|
|
|
|
|
#if !defined (COFF_PE_READ_H)
|
|
|
|
#define COFF_PE_READ_H
|
|
|
|
|
|
|
|
struct objfile;
|
2012-12-13 18:44:45 +08:00
|
|
|
struct bfd;
|
2003-02-20 11:12:46 +08:00
|
|
|
|
2011-01-01 06:59:52 +08:00
|
|
|
/* Read the export table and convert it to minimal symbol table
|
|
|
|
entries */
|
Record minimal symbols directly in reader.
This patch changes minimal symbol creation in two ways. First, it
removes global variables in favor of members of minimal_symbol_reader.
Second, it changes functions like prim_record_minimal_symbol to be
member functions of minimal_symbol_reader.
2016-10-21 Tom Tromey <tom@tromey.com>
* xcoffread.c (record_minimal_symbol, scan_xcoff_symtab): Add
"reader" argument. Update.
(xcoff_initial_scan): Update.
* symfile.h (mdebug_build_psymtabs): Add "reader" argument.
* mipsread.c (mipscoff_symfile_read): Update.
(read_alphacoff_dynamic_symtab): Add "reader" argument. Update.
* minsyms.h (minimal_symbol_reader) <record, record_full>:
Declare.
<m_msym_bunch, m_msym_bunch_index, m_msym_count>: New members.
<record_with_info>: New function, renamed from
prim_record_minimal_symbol_and_info.
* minsyms.c (msym_bunch, msym_bunch_index, msym_count): Remove
globals.
(minimal_symbol_reader): Initialize new members.
(minimal_symbol_reader::record): Renamed from
prim_record_minimal_symbol.
(minimal_symbol_reader::record_full): Renamed from
prim_record_minimal_symbol_full.
(prim_record_minimal_symbol_and_info): Move to minsyms.h; rename.
* mdebugread.c (mdebug_build_psymtabs, parse_partial_symbols)
(record_minimal_symbol): Add "reader" argument. Update.
(elfmdebug_build_psymtabs): Update.
* machoread.c (macho_symtab_add_minsym, macho_symtab_read): Add
"reader" argument. Update.
(macho_symfile_read): Update.
* elfread.c (record_minimal_symbol, elf_symtab_read)
(elf_rel_plt_read): Add "reader" argument. Update.
(elf_read_minimal_symbols): Update.
* dbxread.c (record_minimal_symbol, read_dbx_dynamic_symtab)
(read_dbx_symtab): Add "reader" argument. Update.
(dbx_symfile_read): Update.
* coffread.c (record_minimal_symbol, coff_symtab_read): Add
"reader" argument. Update.
(coff_symfile_read): Update.
* coff-pe-read.h (read_pe_exported_syms): Add "reader" argument.
* coff-pe-read.c (add_pe_exported_sym, add_pe_forwarded_sym)
(read_pe_exported_syms): Add "reader" argument. Update.
2016-09-23 04:25:08 +08:00
|
|
|
extern void read_pe_exported_syms (minimal_symbol_reader &reader,
|
|
|
|
struct objfile *objfile);
|
2003-02-20 11:12:46 +08:00
|
|
|
|
2012-12-13 18:44:45 +08:00
|
|
|
/* Extract from ABFD the offset of the .text section.
|
|
|
|
Returns default value 0x1000 if information is not found. */
|
|
|
|
extern CORE_ADDR pe_text_section_offset (struct bfd *abfd);
|
|
|
|
|
2003-02-20 11:12:46 +08:00
|
|
|
#endif /* !defined (COFF_PE_READ_H) */
|