1999-04-16 01:35:26 +00:00
|
|
|
/* Definitions for reading symbol files into GDB.
|
2003-06-07 23:50:23 +00:00
|
|
|
|
2007-01-09 17:59:20 +00:00
|
|
|
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
2010-01-01 07:32:07 +00:00
|
|
|
2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009, 2010
|
2009-01-03 05:58:08 +00:00
|
|
|
Free Software Foundation, Inc.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
This file is part of GDB.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
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-23 18:08:50 +00:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
1999-07-07 20:19:36 +00:00
|
|
|
(at your option) any later version.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
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.
|
1999-04-16 01:35:26 +00:00
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
You should have received a copy of the GNU General Public License
|
2007-08-23 18:08:50 +00:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
#if !defined (SYMFILE_H)
|
|
|
|
#define SYMFILE_H
|
|
|
|
|
|
|
|
/* This file requires that you first include "bfd.h". */
|
2007-03-22 13:35:05 +00:00
|
|
|
#include "symtab.h"
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2002-10-17 21:16:12 +00:00
|
|
|
/* Opaque declarations. */
|
2009-05-22 23:49:14 +00:00
|
|
|
struct target_section;
|
2003-04-12 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Add missing opaque declarations.
* gdbarch.h: Regnerate.
* symtab.h: Add missing opaque declarations.
* value.h, target.h, symfile.h, stabsread.h: Ditto.
* x86-64-tdep.h, xmodem.h, monitor.h, typeprint.h: Ditto.
* srec.h, solib-svr4.h, source.h, inferior.h: Ditto.
* ser-unix.h, serial.h, remote-utils.h, gdbcore.h: Ditto.
* ppc-tdep.h, ocd.h, mips-tdep.h, gdbtypes.h: Ditto.
* buildsym.h, builtin-regs.h, linespec.h, language.h: Ditto.
* i387-tdep.h, gdbthread.h, event-top.h, gdb.h: Ditto.
* dwarf2cfi.h, doublest.h, disasm.h, cp-abi.h: Ditto.
* cli-out.h, c-lang.h, ax-gdb.h, arch-utils.h: Ditto.
* ada-lang.h, config/nm-lynx.h, config/nm-linux.h: Ditto.
* config/sparc/tm-sp64.h, config/rs6000/tm-rs6000.h: Ditto.
* config/pa/tm-hppah.h, config/m68k/tm-delta68.h: Ditto.
* cli/cli-setshow.h, cli/cli-script.h: Ditto.
2003-04-12 17:41:26 +00:00
|
|
|
struct objfile;
|
2007-05-11 19:57:17 +00:00
|
|
|
struct obj_section;
|
2002-10-17 21:16:12 +00:00
|
|
|
struct obstack;
|
2003-02-19 David Carlton <carlton@math.stanford.edu>
* Makefile.in (SFILES): Add block.c.
(block_h): New.
(COMMON_OBS): Add block.o.
(block.o): New.
(x86-64-tdep.o): Add $(block_h).
(values.o, valops.o, tracepoint.o, symtab.o, symmisc.o, symfile.o)
(stack.o, printcmd.o, p-exp.tab.o, parse.o, objfiles.o)
(objc-exp.tab.o, objc-lang.o, nlmread.o, mips-tdep.o, mdebugread.o)
(m2-exp.tab.o, linespec.o, jv-lang.o, jv-exp.tab.o, infcmd.o)
(f-valprint.o, findvar.o, f-exp.tab.o, expprint.o, coffread.o)
(c-exp.tab.o, buildsym.o, breakpoint.o, blockframe.o, ax-gdb.o)
(alpha-tdep.o, ada-lang.o, ada-exp.tab.o, mi-cmd-stack.o): Ditto.
* value.h: Add opaque declaration for struct block.
* parser-defs.h, objc-lang.h, buildsym.h, breakpoint.h: Ditto.
* ada-lang.h: Ditto.
* x86-64-tdep.c: #include "block.h"
* values.c, valops.c, tracepoint.c, symtab.c, symmisc.c: Ditto.
* symfile.c, stack.c, printcmd.c, p-exp.y, parse.c: Ditto.
* objfiles.c, objc-exp.y, objc-lang.c, nlmread.c: Ditto.
* mips-tdep.c, mdebugread.c, m2-exp.y, linespec.c: Ditto.
* jv-lang.c, jv-exp.y, infcmd.c, f-valprint.c: Ditto.
* findvar.c, f-exp.y, expprint.c, coffread.c, c-exp.y: Ditto.
* buildsym.c, breakpoint.c, blockframe.c, ax-gdb.c: Ditto.
* alpha-tdep.c, ada-lang.c, ada-exp.y: Ditto.
* blockframe.c (blockvector_for_pc_sect): Move to "block.c".
(blockvector_for_pc, block_for_pc_sect, block_for_pc): Ditto.
* symtab.c (block_function): Ditto.
(contained_in): Ditto.
* frame.h: Move block_for_pc and block_for_pc_sect declarations to
block.h. Add opaque declaration for struct block.
* symtab.h: Move block_function and contained_in declarations to
block.h. Add opaque declarations for struct block, struct
blockvector.
(struct block): Move to block.h.
(struct blockvector): Ditto.
(BLOCK_START, BLOCK_END, BLOCK_FUNCTION, BLOCK_SUPERBLOCK)
(BLOCK_GCC_COMPILED, BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM)
(BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE)
(ALL_BLOCK_SYMBOLS, BLOCK_SHOULD_SORT, BLOCKVECTOR_NBLOCKS)
(BLOCKVECTOR_BLOCK, GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK):
Ditto.
* block.c: New file.
* block.h: New file.
2003-02-19 David Carlton <carlton@math.stanford.edu>
* mi-cmd-stack.c: #include "block.h"
2003-02-20 00:01:07 +00:00
|
|
|
struct block;
|
2002-10-17 21:16:12 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Partial symbols are stored in the psymbol_cache and pointers to
|
|
|
|
them are kept in a dynamically grown array that is obtained from
|
|
|
|
malloc and grown as necessary via realloc. Each objfile typically
|
|
|
|
has two of these, one for global symbols and one for static
|
|
|
|
symbols. Although this adds a level of indirection for storing or
|
|
|
|
accessing the partial symbols, it allows us to throw away duplicate
|
|
|
|
psymbols and set all pointers to the single saved instance. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
struct psymbol_allocation_list
|
2003-06-07 23:50:23 +00:00
|
|
|
{
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Pointer to beginning of dynamically allocated array of pointers
|
|
|
|
to partial symbols. The array is dynamically expanded as
|
|
|
|
necessary to accommodate more pointers. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
struct partial_symbol **list;
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Pointer to next available slot in which to store a pointer to a
|
|
|
|
partial symbol. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
struct partial_symbol **next;
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Number of allocated pointer slots in current dynamic array (not
|
|
|
|
the number of bytes of storage). The "next" pointer will always
|
|
|
|
point somewhere between list[0] and list[size], and when at
|
|
|
|
list[size] the array will be expanded on the next attempt to
|
|
|
|
store a pointer. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
int size;
|
|
|
|
};
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2000-03-21 22:37:42 +00:00
|
|
|
/* Define an array of addresses to accommodate non-contiguous dynamic
|
|
|
|
loading of modules. This is for use when entering commands, so we
|
2003-06-07 23:50:23 +00:00
|
|
|
can keep track of the section names until we read the file and can
|
|
|
|
map them to bfd sections. This structure is also used by solib.c
|
|
|
|
to communicate the section addresses in shared objects to
|
|
|
|
symbol_file_add (). */
|
|
|
|
|
|
|
|
struct section_addr_info
|
2000-03-21 22:37:42 +00:00
|
|
|
{
|
2003-06-06 23:33:00 +00:00
|
|
|
/* The number of sections for which address information is
|
|
|
|
available. */
|
|
|
|
size_t num_sections;
|
2000-09-02 00:12:17 +00:00
|
|
|
/* Sections whose names are file format dependent. */
|
2000-03-21 22:37:42 +00:00
|
|
|
struct other_sections
|
|
|
|
{
|
|
|
|
CORE_ADDR addr;
|
|
|
|
char *name;
|
2010-02-19 06:19:45 +00:00
|
|
|
|
|
|
|
/* SECTINDEX must be valid for associated BFD if ADDR is not zero. */
|
2000-03-21 22:37:42 +00:00
|
|
|
int sectindex;
|
2003-06-06 23:33:00 +00:00
|
|
|
} other[1];
|
2000-03-21 22:37:42 +00:00
|
|
|
};
|
|
|
|
|
2007-09-24 21:48:29 +00:00
|
|
|
|
|
|
|
/* A table listing the load segments in a symfile, and which segment
|
|
|
|
each BFD section belongs to. */
|
2007-06-18 15:46:38 +00:00
|
|
|
struct symfile_segment_data
|
|
|
|
{
|
|
|
|
/* How many segments are present in this file. If there are
|
|
|
|
two, the text segment is the first one and the data segment
|
|
|
|
is the second one. */
|
|
|
|
int num_segments;
|
|
|
|
|
|
|
|
/* If NUM_SEGMENTS is greater than zero, the original base address
|
|
|
|
of each segment. */
|
|
|
|
CORE_ADDR *segment_bases;
|
|
|
|
|
|
|
|
/* If NUM_SEGMENTS is greater than zero, the memory size of each
|
|
|
|
segment. */
|
|
|
|
CORE_ADDR *segment_sizes;
|
|
|
|
|
|
|
|
/* If NUM_SEGMENTS is greater than zero, this is an array of entries
|
2007-09-24 21:48:29 +00:00
|
|
|
recording which segment contains each BFD section.
|
|
|
|
SEGMENT_INFO[I] is S+1 if the I'th BFD section belongs to segment
|
|
|
|
S, or zero if it is not in any segment. */
|
2007-06-18 15:46:38 +00:00
|
|
|
int *segment_info;
|
|
|
|
};
|
|
|
|
|
gdb
* xcoffread.c: Include psymtab.h.
(xcoff_sym_fns): Update.
* symtab.h (struct partial_symbol): Remove.
(PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.
(struct partial_symtab): Remove.
(PSYMTAB_TO_SYMTAB): Remove.
(lookup_partial_symbol, lookup_partial_symtab, find_pc_psymtab)
(find_pc_sect_psymtab): Remove.
(find_pc_sect_symtab_via_partial): Declare.
(find_pc_psymtab, find_pc_sect_psymbol, psymtab_to_symtab)
(find_main_psymtab): Remove.
(find_main_filename): Declare.
(fixup_psymbol_section): Remove.
(fixup_section): Declare.
* symtab.c: Include psymtab.h.
(lookup_symtab): Use lookup_symtab method.
(lookup_partial_symtab): Remove.
(find_pc_sect_psymtab_closer): Remove.
(find_pc_sect_psymtab): Remove.
(find_pc_sect_symtab_via_partial): New function.
(find_pc_psymtab, find_pc_sect_psymbol, find_pc_psymbol): Remove.
(fixup_section): No longer static.
(fixup_psymbol_section): Remove.
(lookup_symbol_aux): Use lookup_symbol_aux_quick.
(lookup_global_symbol_from_objfile): Likewise.
(lookup_symbol_aux_psymtabs): Remove.
(lookup_symbol_aux_quick): New function.
(lookup_symbol_global): Use lookup_symbol_aux_quick.
(lookup_partial_symbol): Remove.
(basic_lookup_transparent_type_quick): New function.
(basic_lookup_transparent_type): Use it.
(find_main_psymtab): Remove.
(find_main_filename): New function.
(find_pc_sect_symtab): Use find_pc_sect_symtab method.
(find_line_symtab): Use expand_symtabs_with_filename method.
(output_partial_symbol_filename): New function.
(sources_info): Use map_partial_symbol_filenames.
(struct search_symbols_data): New type.
(search_symbols_file_matches): New function.
(search_symbols_name_matches): Likewise.
(search_symbols): Use expand_symtabs_matching method.
(struct add_name_data): Rename from add_macro_name_data.
(add_macro_name): Update.
(add_partial_symbol_name): New function.
(default_make_symbol_completion_list): Use
map_partial_symbol_names.
(struct add_partial_symbol_name): New type.
(maybe_add_partial_symtab_filename): New function.
(make_source_files_completion_list): Use
map_partial_symbol_filenames.
(expand_line_sal): Use expand_symtabs_with_filename method.
* symmisc.c: Include psymtab.h.
(print_objfile_statistics): Use print_stats method.
(dump_objfile): Use dump method.
(dump_psymtab, maintenance_print_psymbols)
(maintenance_info_psymtabs, maintenance_check_symtabs)
(extend_psymbol_list): Remove.
* symfile.h (struct quick_symbol_functions): New struct.
(struct sym_fns) <qf>: New field.
(sort_pst_symbols): Remove.
(increment_reading_symtab): Declare.
* symfile.c: Include psymtab.h.
(compare_psymbols, sort_pst_symbols): Remove.
(psymtab_to_symtab): Remove.
(increment_reading_symtab): New function.
(symbol_file_add_with_addrs_or_offsets): Use expand_all_symtabs
method.
(set_initial_language): Use find_main_filename.
(allocate_psymtab, discard_psymtab, cashier_psymtab): Remove.
(free_named_symtabs): Remove unused code.
(start_psymtab_common, add_psymbol_to_bcache)
(append_psymbol_to_list, add_psymbol_to_list, init_psymbol_list):
Remove.
* stack.c: Include psymtab.h, symfile.h.
(backtrace_command_1): Use find_pc_sect_symtab_via_partial.
* source.h (psymtab_to_fullname): Don't declare.
* source.c: Include psymtab.h.
(select_source_symtab): Use find_last_source_symtab method.
(forget_cached_source_info): Use forget_cached_source_info
method.
(find_and_open_source): No longer static.
(psymtab_to_fullname): Remove.
* somread.c: Include psymtab.h.
(som_sym_fns): Update.
* psympriv.h: New file.
* psymtab.h: New file.
* psymtab.c: New file.
* objfiles.h: (ALL_OBJFILE_PSYMTABS): Remove.
(ALL_PSYMTABS, ALL_PSPACE_PSYMTABS): Likewise.
* objfiles.c: Include psymtab.h.
(objfile_relocate1): Use relocate method.
(objfile_has_partial_symbols): Use has_symbols method.
* mipsread.c: Include psymtab.h.
(ecoff_sym_fns): Update.
* mi/mi-cmd-file.c: Include psymtab.h.
(print_partial_file_name): New function.
(mi_cmd_file_list_exec_source_files): Use
map_partial_symbol_filenames.
* mdebugread.c: Include psympriv.h.
* machoread.c: Include psympriv.h.
(macho_sym_fns): Update.
* m2-exp.y (yylex): Use lookup_symtab.
* elfread.c: Include psympriv.h.
(elf_sym_fns): Update.
* dwarf2read.c: Include psympriv.h.
* dbxread.c: Include psympriv.h.
(aout_sym_fns): Update.
* cp-support.c: Include psymtab.h.
(read_in_psymtabs): Remove.
(make_symbol_overload_list_qualified): Use
expand_symtabs_for_function method.
* coffread.c: Include psympriv.h.
(coff_sym_fns): Update.
* blockframe.c: Include psymtab.h.
(find_pc_partial_function): Use find_pc_sect_symtab method.
* ada-lang.h (ada_update_initial_language): Update.
* ada-lang.c: Include psymtab.h.
(ada_update_initial_language): Remove 'main_pst' argument.
(ada_lookup_partial_symbol): Remove.
(struct ada_psym_data): New type.
(ada_add_psyms): New function.
(ada_add_non_local_symbols): Use map_ada_symtabs method.
(struct add_partial_datum): New type.
(ada_add_partial_symbol_completions): New function.
(ada_make_symbol_completion_list): Use map_partial_symbol_names.
(ada_exception_support_info_sniffer): Update.
* Makefile.in (SFILES): Add psymtab.c.
(COMMON_OBS): Add psymtab.o.
(HFILES_NO_SRCDIR): Add psymtab.h, psympriv.h.
gdb/doc
* gdbint.texinfo (Symbol Handling): Update.
2010-03-10 18:20:08 +00:00
|
|
|
/* The "quick" symbol functions exist so that symbol readers can
|
|
|
|
avoiding an initial read of all the symbols. For example, symbol
|
|
|
|
readers might choose to use the "partial symbol table" utilities,
|
|
|
|
which is one implementation of the quick symbol functions.
|
|
|
|
|
|
|
|
The quick symbol functions are generally opaque: the underlying
|
|
|
|
representation is hidden from the caller.
|
|
|
|
|
|
|
|
In general, these functions should only look at whatever special
|
|
|
|
index the symbol reader creates -- looking through the symbol
|
|
|
|
tables themselves is handled by generic code. If a function is
|
|
|
|
defined as returning a "symbol table", this means that the function
|
|
|
|
should only return a newly-created symbol table; it should not
|
|
|
|
examine pre-existing ones.
|
|
|
|
|
|
|
|
The exact list of functions here was determined in an ad hoc way
|
|
|
|
based on gdb's history. */
|
|
|
|
|
|
|
|
struct quick_symbol_functions
|
|
|
|
{
|
|
|
|
/* Return true if this objfile has any "partial" symbols
|
|
|
|
available. */
|
|
|
|
int (*has_symbols) (struct objfile *objfile);
|
|
|
|
|
|
|
|
/* Return the symbol table for the "last" file appearing in
|
|
|
|
OBJFILE. */
|
|
|
|
struct symtab *(*find_last_source_symtab) (struct objfile *objfile);
|
|
|
|
|
|
|
|
/* Forget all cached full file names for OBJFILE. */
|
|
|
|
void (*forget_cached_source_info) (struct objfile *objfile);
|
|
|
|
|
|
|
|
/* Look up the symbol table, in OBJFILE, of a source file named
|
|
|
|
NAME. If there is no '/' in the name, a match after a '/' in the
|
|
|
|
symbol table's file name will also work. FULL_PATH is the
|
|
|
|
absolute file name, and REAL_PATH is the same, run through
|
|
|
|
gdb_realpath.
|
|
|
|
|
|
|
|
If no such symbol table can be found, returns 0.
|
|
|
|
|
|
|
|
Otherwise, sets *RESULT to the symbol table and returns 1. This
|
|
|
|
might return 1 and set *RESULT to NULL if the requested file is
|
|
|
|
an include file that does not have a symtab of its own. */
|
|
|
|
int (*lookup_symtab) (struct objfile *objfile,
|
|
|
|
const char *name,
|
|
|
|
const char *full_path,
|
|
|
|
const char *real_path,
|
|
|
|
struct symtab **result);
|
|
|
|
|
|
|
|
/* Check to see if the symbol is defined in a "partial" symbol table
|
|
|
|
of OBJFILE. KIND should be either GLOBAL_BLOCK or STATIC_BLOCK,
|
|
|
|
depending on whether we want to search global symbols or static
|
|
|
|
symbols. NAME is the name of the symbol to look for. DOMAIN
|
|
|
|
indicates what sort of symbol to search for.
|
|
|
|
|
|
|
|
Returns the newly-expanded symbol table in which the symbol is
|
|
|
|
defined, or NULL if no such symbol table exists. */
|
|
|
|
struct symtab *(*lookup_symbol) (struct objfile *objfile,
|
|
|
|
int kind, const char *name,
|
|
|
|
domain_enum domain);
|
|
|
|
|
|
|
|
/* Print statistics about any indices loaded for OBJFILE. The
|
|
|
|
statistics should be printed to gdb_stdout. This is used for
|
|
|
|
"maint print statistics". */
|
|
|
|
void (*print_stats) (struct objfile *objfile);
|
|
|
|
|
|
|
|
/* Dump any indices loaded for OBJFILE. The dump should go to
|
|
|
|
gdb_stdout. This is used for "maint print objfiles". */
|
|
|
|
void (*dump) (struct objfile *objfile);
|
|
|
|
|
|
|
|
/* This is called by objfile_relocate to relocate any indices loaded
|
|
|
|
for OBJFILE. */
|
|
|
|
void (*relocate) (struct objfile *objfile,
|
|
|
|
struct section_offsets *new_offsets,
|
|
|
|
struct section_offsets *delta);
|
|
|
|
|
|
|
|
/* Find all the symbols in OBJFILE named FUNC_NAME, and ensure that
|
|
|
|
the corresponding symbol tables are loaded. */
|
|
|
|
void (*expand_symtabs_for_function) (struct objfile *objfile,
|
|
|
|
const char *func_name);
|
|
|
|
|
|
|
|
/* Read all symbol tables associated with OBJFILE. */
|
|
|
|
void (*expand_all_symtabs) (struct objfile *objfile);
|
|
|
|
|
|
|
|
/* Read all symbol tables associated with OBJFILE which have the
|
|
|
|
file name FILENAME. */
|
|
|
|
void (*expand_symtabs_with_filename) (struct objfile *objfile,
|
|
|
|
const char *filename);
|
|
|
|
|
|
|
|
/* Return the file name of the file holding the symbol in OBJFILE
|
|
|
|
named NAME. If no such symbol exists in OBJFILE, return NULL. */
|
|
|
|
char *(*find_symbol_file) (struct objfile *objfile, const char *name);
|
|
|
|
|
|
|
|
/* This method is specific to Ada. It walks the partial symbol
|
|
|
|
tables of OBJFILE looking for a name match. WILD_MATCH and
|
|
|
|
IS_NAME_SUFFIX are predicate functions that the implementation
|
|
|
|
may call to check for a match.
|
|
|
|
|
|
|
|
This function is completely ad hoc and new implementations should
|
|
|
|
refer to the psymtab implementation to see what to do. */
|
|
|
|
void (*map_ada_symtabs) (struct objfile *objfile,
|
|
|
|
int (*wild_match) (const char *, int, const char *),
|
|
|
|
int (*is_name_suffix) (const char *),
|
|
|
|
void (*callback) (struct objfile *,
|
|
|
|
struct symtab *, void *),
|
|
|
|
const char *name, int global,
|
|
|
|
domain_enum namespace, int wild,
|
|
|
|
void *data);
|
|
|
|
|
|
|
|
/* Expand all symbol tables in OBJFILE matching some criteria.
|
|
|
|
|
|
|
|
FILE_MATCHER is called for each file in OBJFILE. The file name
|
|
|
|
and the DATA argument are passed to it. If it returns zero, this
|
|
|
|
file is skipped.
|
|
|
|
|
|
|
|
Otherwise, if the file is not skipped, then NAME_MATCHER is
|
|
|
|
called for each symbol defined in the file. The symbol's
|
|
|
|
"natural" name and DATA are passed to NAME_MATCHER.
|
|
|
|
|
|
|
|
If NAME_MATCHER returns zero, then this symbol is skipped.
|
|
|
|
|
|
|
|
Otherwise, if this symbol is not skipped, and it matches KIND,
|
|
|
|
then this symbol's symbol table is expanded.
|
|
|
|
|
|
|
|
DATA is user data that is passed unmodified to the callback
|
|
|
|
functions. */
|
|
|
|
void (*expand_symtabs_matching) (struct objfile *objfile,
|
|
|
|
int (*file_matcher) (const char *, void *),
|
|
|
|
int (*name_matcher) (const char *, void *),
|
|
|
|
domain_enum kind,
|
|
|
|
void *data);
|
|
|
|
|
|
|
|
/* Return the symbol table from OBJFILE that contains PC and
|
|
|
|
SECTION. Return NULL if there is no such symbol table. This
|
|
|
|
should return the symbol table that contains a symbol whose
|
|
|
|
address exactly matches PC, or, if there is no exact match, the
|
|
|
|
symbol table that contains a symbol whose address is closest to
|
|
|
|
PC. */
|
|
|
|
struct symtab *(*find_pc_sect_symtab) (struct objfile *objfile,
|
|
|
|
struct minimal_symbol *msymbol,
|
|
|
|
CORE_ADDR pc,
|
|
|
|
struct obj_section *section,
|
|
|
|
int warn_if_readin);
|
|
|
|
|
|
|
|
/* Call a callback for every symbol defined in OBJFILE. FUN is the
|
|
|
|
callback. It is passed the symbol's natural name, and the DATA
|
|
|
|
passed to this function. */
|
|
|
|
void (*map_symbol_names) (struct objfile *objfile,
|
|
|
|
void (*fun) (const char *, void *),
|
|
|
|
void *data);
|
|
|
|
|
|
|
|
/* Call a callback for every file defined in OBJFILE. FUN is the
|
|
|
|
callback. It is passed the file's name, the file's full name,
|
|
|
|
and the DATA passed to this function. */
|
|
|
|
void (*map_symbol_filenames) (struct objfile *objfile,
|
|
|
|
void (*fun) (const char *, const char *,
|
|
|
|
void *),
|
|
|
|
void *data);
|
|
|
|
};
|
|
|
|
|
1999-04-16 01:35:26 +00:00
|
|
|
/* Structure to keep track of symbol reading functions for various
|
|
|
|
object file types. */
|
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
struct sym_fns
|
2003-06-07 23:50:23 +00:00
|
|
|
{
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* BFD flavour that we handle, or (as a special kludge, see
|
|
|
|
xcoffread.c, (enum bfd_flavour)-1 for xcoff). */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
enum bfd_flavour sym_flavour;
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Initializes anything that is global to the entire symbol table.
|
|
|
|
It is called during symbol_file_add, when we begin debugging an
|
|
|
|
entirely new program. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
void (*sym_new_init) (struct objfile *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Reads any initial information from a symbol file, and initializes
|
|
|
|
the struct sym_fns SF in preparation for sym_read(). It is
|
|
|
|
called every time we read a symbol file for any reason. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
void (*sym_init) (struct objfile *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2009-12-07 09:47:40 +00:00
|
|
|
/* sym_read (objfile, symfile_flags) Reads a symbol file into a psymtab
|
2003-06-07 23:50:23 +00:00
|
|
|
(or possibly a symtab). OBJFILE is the objfile struct for the
|
2009-12-07 09:47:40 +00:00
|
|
|
file we are reading. SYMFILE_FLAGS are the flags passed to
|
|
|
|
symbol_file_add & co. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
void (*sym_read) (struct objfile *, int);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Called when we are finished with an objfile. Should do all
|
|
|
|
cleanup that is specific to the object file format for the
|
|
|
|
particular objfile. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
void (*sym_finish) (struct objfile *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* This function produces a file-dependent section_offsets
|
|
|
|
structure, allocated in the objfile's storage, and based on the
|
|
|
|
parameter. The parameter is currently a CORE_ADDR (FIXME!) for
|
|
|
|
backward compatibility with the higher levels of GDB. It should
|
|
|
|
probably be changed to a string, where NULL means the default,
|
|
|
|
and others are parsed in a file dependent way. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
void (*sym_offsets) (struct objfile *, struct section_addr_info *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2007-06-18 15:46:38 +00:00
|
|
|
/* This function produces a format-independent description of
|
|
|
|
the segments of ABFD. Each segment is a unit of the file
|
|
|
|
which may be relocated independently. */
|
|
|
|
|
|
|
|
struct symfile_segment_data *(*sym_segments) (bfd *abfd);
|
|
|
|
|
2007-09-21 18:01:26 +00:00
|
|
|
/* This function should read the linetable from the objfile when
|
|
|
|
the line table cannot be read while processing the debugging
|
|
|
|
information. */
|
2010-02-03 14:13:16 +00:00
|
|
|
|
2007-09-21 18:01:26 +00:00
|
|
|
void (*sym_read_linetable) (void);
|
|
|
|
|
2010-02-03 14:13:16 +00:00
|
|
|
/* Relocate the contents of a debug section SECTP. The
|
|
|
|
contents are stored in BUF if it is non-NULL, or returned in a
|
|
|
|
malloc'd buffer otherwise. */
|
|
|
|
|
|
|
|
bfd_byte *(*sym_relocate) (struct objfile *, asection *sectp, bfd_byte *buf);
|
|
|
|
|
gdb
* xcoffread.c: Include psymtab.h.
(xcoff_sym_fns): Update.
* symtab.h (struct partial_symbol): Remove.
(PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.
(struct partial_symtab): Remove.
(PSYMTAB_TO_SYMTAB): Remove.
(lookup_partial_symbol, lookup_partial_symtab, find_pc_psymtab)
(find_pc_sect_psymtab): Remove.
(find_pc_sect_symtab_via_partial): Declare.
(find_pc_psymtab, find_pc_sect_psymbol, psymtab_to_symtab)
(find_main_psymtab): Remove.
(find_main_filename): Declare.
(fixup_psymbol_section): Remove.
(fixup_section): Declare.
* symtab.c: Include psymtab.h.
(lookup_symtab): Use lookup_symtab method.
(lookup_partial_symtab): Remove.
(find_pc_sect_psymtab_closer): Remove.
(find_pc_sect_psymtab): Remove.
(find_pc_sect_symtab_via_partial): New function.
(find_pc_psymtab, find_pc_sect_psymbol, find_pc_psymbol): Remove.
(fixup_section): No longer static.
(fixup_psymbol_section): Remove.
(lookup_symbol_aux): Use lookup_symbol_aux_quick.
(lookup_global_symbol_from_objfile): Likewise.
(lookup_symbol_aux_psymtabs): Remove.
(lookup_symbol_aux_quick): New function.
(lookup_symbol_global): Use lookup_symbol_aux_quick.
(lookup_partial_symbol): Remove.
(basic_lookup_transparent_type_quick): New function.
(basic_lookup_transparent_type): Use it.
(find_main_psymtab): Remove.
(find_main_filename): New function.
(find_pc_sect_symtab): Use find_pc_sect_symtab method.
(find_line_symtab): Use expand_symtabs_with_filename method.
(output_partial_symbol_filename): New function.
(sources_info): Use map_partial_symbol_filenames.
(struct search_symbols_data): New type.
(search_symbols_file_matches): New function.
(search_symbols_name_matches): Likewise.
(search_symbols): Use expand_symtabs_matching method.
(struct add_name_data): Rename from add_macro_name_data.
(add_macro_name): Update.
(add_partial_symbol_name): New function.
(default_make_symbol_completion_list): Use
map_partial_symbol_names.
(struct add_partial_symbol_name): New type.
(maybe_add_partial_symtab_filename): New function.
(make_source_files_completion_list): Use
map_partial_symbol_filenames.
(expand_line_sal): Use expand_symtabs_with_filename method.
* symmisc.c: Include psymtab.h.
(print_objfile_statistics): Use print_stats method.
(dump_objfile): Use dump method.
(dump_psymtab, maintenance_print_psymbols)
(maintenance_info_psymtabs, maintenance_check_symtabs)
(extend_psymbol_list): Remove.
* symfile.h (struct quick_symbol_functions): New struct.
(struct sym_fns) <qf>: New field.
(sort_pst_symbols): Remove.
(increment_reading_symtab): Declare.
* symfile.c: Include psymtab.h.
(compare_psymbols, sort_pst_symbols): Remove.
(psymtab_to_symtab): Remove.
(increment_reading_symtab): New function.
(symbol_file_add_with_addrs_or_offsets): Use expand_all_symtabs
method.
(set_initial_language): Use find_main_filename.
(allocate_psymtab, discard_psymtab, cashier_psymtab): Remove.
(free_named_symtabs): Remove unused code.
(start_psymtab_common, add_psymbol_to_bcache)
(append_psymbol_to_list, add_psymbol_to_list, init_psymbol_list):
Remove.
* stack.c: Include psymtab.h, symfile.h.
(backtrace_command_1): Use find_pc_sect_symtab_via_partial.
* source.h (psymtab_to_fullname): Don't declare.
* source.c: Include psymtab.h.
(select_source_symtab): Use find_last_source_symtab method.
(forget_cached_source_info): Use forget_cached_source_info
method.
(find_and_open_source): No longer static.
(psymtab_to_fullname): Remove.
* somread.c: Include psymtab.h.
(som_sym_fns): Update.
* psympriv.h: New file.
* psymtab.h: New file.
* psymtab.c: New file.
* objfiles.h: (ALL_OBJFILE_PSYMTABS): Remove.
(ALL_PSYMTABS, ALL_PSPACE_PSYMTABS): Likewise.
* objfiles.c: Include psymtab.h.
(objfile_relocate1): Use relocate method.
(objfile_has_partial_symbols): Use has_symbols method.
* mipsread.c: Include psymtab.h.
(ecoff_sym_fns): Update.
* mi/mi-cmd-file.c: Include psymtab.h.
(print_partial_file_name): New function.
(mi_cmd_file_list_exec_source_files): Use
map_partial_symbol_filenames.
* mdebugread.c: Include psympriv.h.
* machoread.c: Include psympriv.h.
(macho_sym_fns): Update.
* m2-exp.y (yylex): Use lookup_symtab.
* elfread.c: Include psympriv.h.
(elf_sym_fns): Update.
* dwarf2read.c: Include psympriv.h.
* dbxread.c: Include psympriv.h.
(aout_sym_fns): Update.
* cp-support.c: Include psymtab.h.
(read_in_psymtabs): Remove.
(make_symbol_overload_list_qualified): Use
expand_symtabs_for_function method.
* coffread.c: Include psympriv.h.
(coff_sym_fns): Update.
* blockframe.c: Include psymtab.h.
(find_pc_partial_function): Use find_pc_sect_symtab method.
* ada-lang.h (ada_update_initial_language): Update.
* ada-lang.c: Include psymtab.h.
(ada_update_initial_language): Remove 'main_pst' argument.
(ada_lookup_partial_symbol): Remove.
(struct ada_psym_data): New type.
(ada_add_psyms): New function.
(ada_add_non_local_symbols): Use map_ada_symtabs method.
(struct add_partial_datum): New type.
(ada_add_partial_symbol_completions): New function.
(ada_make_symbol_completion_list): Use map_partial_symbol_names.
(ada_exception_support_info_sniffer): Update.
* Makefile.in (SFILES): Add psymtab.c.
(COMMON_OBS): Add psymtab.o.
(HFILES_NO_SRCDIR): Add psymtab.h, psympriv.h.
gdb/doc
* gdbint.texinfo (Symbol Handling): Update.
2010-03-10 18:20:08 +00:00
|
|
|
/* The "quick" (aka partial) symbol functions for this symbol
|
|
|
|
reader. */
|
|
|
|
const struct quick_symbol_functions *qf;
|
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Finds the next struct sym_fns. They are allocated and
|
|
|
|
initialized in whatever module implements the functions pointed
|
|
|
|
to; an initializer calls add_symtab_fns to add them to the global
|
|
|
|
chain. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
struct sym_fns *next;
|
1999-07-07 20:19:36 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
};
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2010-01-09 09:11:00 +00:00
|
|
|
extern struct section_addr_info *
|
|
|
|
build_section_addr_info_from_objfile (const struct objfile *objfile);
|
|
|
|
|
2010-01-08 22:55:15 +00:00
|
|
|
extern void relative_addr_info_to_section_offsets
|
|
|
|
(struct section_offsets *section_offsets, int num_sections,
|
|
|
|
struct section_addr_info *addrs);
|
|
|
|
|
|
|
|
extern void addr_info_make_relative (struct section_addr_info *addrs,
|
|
|
|
bfd *abfd);
|
|
|
|
|
1999-04-16 01:35:26 +00:00
|
|
|
/* The default version of sym_fns.sym_offsets for readers that don't
|
|
|
|
do anything special. */
|
|
|
|
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* cris-tdep.c: Fix function declaration indentation.
* dwarfread.c, gdbcore.h, gdbtypes.h, i386v-nat.c: Ditto.
* mips-tdep.c, monitor.h, parse.c, proc-utils.h: Ditto.
* rs6000-nat.c, ser-go32.c, somread.c, stabsread.c: Ditto.
* symfile.h, symtab.h, target.c, target.h, value.h: Ditto.
* xcoffread.c, config/pa/tm-hppa.h: Ditto.
* config/sparc/tm-sp64.h, config/sparc/tm-sparc.h: Ditto.
2003-01-19 04:06:47 +00:00
|
|
|
extern void default_symfile_offsets (struct objfile *objfile,
|
|
|
|
struct section_addr_info *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2007-06-18 15:46:38 +00:00
|
|
|
/* The default version of sym_fns.sym_segments for readers that don't
|
|
|
|
do anything special. */
|
|
|
|
|
|
|
|
extern struct symfile_segment_data *default_symfile_segments (bfd *abfd);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2010-02-03 14:13:16 +00:00
|
|
|
/* The default version of sym_fns.sym_relocate for readers that don't
|
|
|
|
do anything special. */
|
|
|
|
|
|
|
|
extern bfd_byte *default_symfile_relocate (struct objfile *objfile,
|
|
|
|
asection *sectp, bfd_byte *buf);
|
|
|
|
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* cris-tdep.c: Fix function declaration indentation.
* dwarfread.c, gdbcore.h, gdbtypes.h, i386v-nat.c: Ditto.
* mips-tdep.c, monitor.h, parse.c, proc-utils.h: Ditto.
* rs6000-nat.c, ser-go32.c, somread.c, stabsread.c: Ditto.
* symfile.h, symtab.h, target.c, target.h, value.h: Ditto.
* xcoffread.c, config/pa/tm-hppa.h: Ditto.
* config/sparc/tm-sp64.h, config/sparc/tm-sparc.h: Ditto.
2003-01-19 04:06:47 +00:00
|
|
|
extern void extend_psymbol_list (struct psymbol_allocation_list *,
|
|
|
|
struct objfile *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Add any kind of symbol to a psymbol_allocation_list. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
/* #include "demangle.h" */
|
|
|
|
|
2003-09-11 David Carlton <carlton@kealia.com>
* gdbtypes.h: Add TYPE_CODE_NAMESPACE.
* gdbtypes.c (init_type): Handle TYPE_CODE_NAMESPACE.
(recursive_dump_type): Ditto.
* printcmd.c (print_formatted): Ditto.
* typeprint.c (print_type_scalar): Ditto.
* c-typeprint.c (c_type_print_varspec_prefix): Ditto.
(c_type_print_varspec_suffix, c_type_print_base): Ditto.
* cp-support.h: Declare cp_check_possible_namespace_symbols,
maint_cplus_cmd_list.
* cp-support.c: Make maint_cplus_cmd_list extern.
* cp-namespace.c: Include objfiles.h, gdbtypes.h, dictionary.h,
command.h.
(lookup_symbol_file): Look in possible namespace blocks when
appropriate.
(initialize_namespace_symtab): New.
(get_possible_namespace_block, free_namespace_block)
(check_possible_namespace_symbols)
(check_possible_namespace_symbols_loop)
(check_one_possible_namespace_symbol)
(lookup_possible_namespace_symbol, maintenance_cplus_namespace)
(_initialize_cp_namespace): Ditto.
* block.h: Declare allocate_block.
* block.c (allocate_block): New.
* jv-lang.c (get_java_class_symtab): Allocate blocks via
allocate_block.
* symfile.h: Update declaration of add_psymbol_to_list.
* symfile.c (add_psymbol_to_list): Return the partial symbol in
question.
* dwarf2read.c (dwarf2_build_psymtabs_hard): Add argument to
scan_partial_symbols_call.
(scan_partial_symbols): Add NAMESPACE argument; update calls to
helper functions.
(add_partial_symbol): If necessary, scan mangled names for names
of namespaces.
(add_partial_namespace): Add NAMESPACE argument; generate partial
symbols associated to namespaces.
(add_partial_enumeration): Add NAMESPACE argument.
(new_symbol): Allow namespace syms.
(read_namespace): Generate namespace syms.
* objfiles.h: Add opaque declaration of struct symtab.
(struct objfile): Add cp_namespace_symtab member.
* objfiles.c (allocate_objfile): Set
objfile->cp_namespace_symtab.
* Makefile.in (cp-namespace.o): Depend on objfiles_h, gdbtypes_h,
dictionary_h, command_h.
2003-09-11 David Carlton <carlton@kealia.com>
* gdb.c++/namespace.exp: Add tests for namespace types.
* gdb.c++/maint.exp (test_help): Test 'help maint cp namespace'.
(test_namespace): New.
2003-09-11 19:49:20 +00:00
|
|
|
extern const
|
2009-11-16 18:40:23 +00:00
|
|
|
struct partial_symbol *add_psymbol_to_list (char *, int, int, domain_enum,
|
2003-09-11 David Carlton <carlton@kealia.com>
* gdbtypes.h: Add TYPE_CODE_NAMESPACE.
* gdbtypes.c (init_type): Handle TYPE_CODE_NAMESPACE.
(recursive_dump_type): Ditto.
* printcmd.c (print_formatted): Ditto.
* typeprint.c (print_type_scalar): Ditto.
* c-typeprint.c (c_type_print_varspec_prefix): Ditto.
(c_type_print_varspec_suffix, c_type_print_base): Ditto.
* cp-support.h: Declare cp_check_possible_namespace_symbols,
maint_cplus_cmd_list.
* cp-support.c: Make maint_cplus_cmd_list extern.
* cp-namespace.c: Include objfiles.h, gdbtypes.h, dictionary.h,
command.h.
(lookup_symbol_file): Look in possible namespace blocks when
appropriate.
(initialize_namespace_symtab): New.
(get_possible_namespace_block, free_namespace_block)
(check_possible_namespace_symbols)
(check_possible_namespace_symbols_loop)
(check_one_possible_namespace_symbol)
(lookup_possible_namespace_symbol, maintenance_cplus_namespace)
(_initialize_cp_namespace): Ditto.
* block.h: Declare allocate_block.
* block.c (allocate_block): New.
* jv-lang.c (get_java_class_symtab): Allocate blocks via
allocate_block.
* symfile.h: Update declaration of add_psymbol_to_list.
* symfile.c (add_psymbol_to_list): Return the partial symbol in
question.
* dwarf2read.c (dwarf2_build_psymtabs_hard): Add argument to
scan_partial_symbols_call.
(scan_partial_symbols): Add NAMESPACE argument; update calls to
helper functions.
(add_partial_symbol): If necessary, scan mangled names for names
of namespaces.
(add_partial_namespace): Add NAMESPACE argument; generate partial
symbols associated to namespaces.
(add_partial_enumeration): Add NAMESPACE argument.
(new_symbol): Allow namespace syms.
(read_namespace): Generate namespace syms.
* objfiles.h: Add opaque declaration of struct symtab.
(struct objfile): Add cp_namespace_symtab member.
* objfiles.c (allocate_objfile): Set
objfile->cp_namespace_symtab.
* Makefile.in (cp-namespace.o): Depend on objfiles_h, gdbtypes_h,
dictionary_h, command_h.
2003-09-11 David Carlton <carlton@kealia.com>
* gdb.c++/namespace.exp: Add tests for namespace types.
* gdb.c++/maint.exp (test_help): Test 'help maint cp namespace'.
(test_namespace): New.
2003-09-11 19:49:20 +00:00
|
|
|
enum address_class,
|
|
|
|
struct psymbol_allocation_list *,
|
|
|
|
long, CORE_ADDR,
|
|
|
|
enum language, struct objfile *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2000-05-28 01:12:42 +00:00
|
|
|
extern void init_psymbol_list (struct objfile *, int);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2000-05-28 01:12:42 +00:00
|
|
|
extern struct symtab *allocate_symtab (char *, struct objfile *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2000-05-28 01:12:42 +00:00
|
|
|
extern void add_symtab_fns (struct sym_fns *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2009-06-16 18:49:25 +00:00
|
|
|
/* This enum encodes bit-flags passed as ADD_FLAGS parameter to
|
|
|
|
syms_from_objfile, symbol_file_add, etc. */
|
|
|
|
|
|
|
|
enum symfile_add_flags
|
|
|
|
{
|
|
|
|
/* Be chatty about what you are doing. */
|
|
|
|
SYMFILE_VERBOSE = 1 << 1,
|
|
|
|
|
|
|
|
/* This is the main symbol file (as opposed to symbol file for dynamically
|
|
|
|
loaded code). */
|
|
|
|
SYMFILE_MAINLINE = 1 << 2,
|
|
|
|
|
|
|
|
/* Do not call breakpoint_re_set when adding this symbol file. */
|
|
|
|
SYMFILE_DEFER_BP_RESET = 1 << 3
|
|
|
|
};
|
|
|
|
|
2003-01-23 07:30:18 +00:00
|
|
|
extern void syms_from_objfile (struct objfile *,
|
2003-06-07 23:50:23 +00:00
|
|
|
struct section_addr_info *,
|
2009-06-16 18:49:25 +00:00
|
|
|
struct section_offsets *, int, int);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2009-06-16 18:49:25 +00:00
|
|
|
extern void new_symfile_objfile (struct objfile *, int);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2000-05-28 01:12:42 +00:00
|
|
|
extern struct objfile *symbol_file_add (char *, int,
|
2009-06-16 18:49:25 +00:00
|
|
|
struct section_addr_info *, int);
|
2000-03-21 22:37:42 +00:00
|
|
|
|
2004-05-02 10:14:02 +00:00
|
|
|
extern struct objfile *symbol_file_add_from_bfd (bfd *, int,
|
|
|
|
struct section_addr_info *,
|
2009-06-16 18:49:25 +00:00
|
|
|
int);
|
2004-05-02 10:14:02 +00:00
|
|
|
|
2010-01-06 10:11:04 +00:00
|
|
|
extern void symbol_file_add_separate (bfd *, int, struct objfile *);
|
2009-12-09 13:44:53 +00:00
|
|
|
|
2010-01-06 10:11:04 +00:00
|
|
|
extern char *find_separate_debug_file_by_debuglink (struct objfile *);
|
2009-12-09 13:44:53 +00:00
|
|
|
|
2003-06-06 23:33:00 +00:00
|
|
|
/* Create a new section_addr_info, with room for NUM_SECTIONS. */
|
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
extern struct section_addr_info *alloc_section_addr_info (size_t
|
|
|
|
num_sections);
|
2003-06-06 23:33:00 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Build (allocate and populate) a section_addr_info struct from an
|
|
|
|
existing section table. */
|
2000-03-21 22:37:42 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
extern struct section_addr_info
|
2009-05-22 23:49:14 +00:00
|
|
|
*build_section_addr_info_from_section_table (const struct target_section
|
2003-06-07 23:50:23 +00:00
|
|
|
*start,
|
2009-05-22 23:49:14 +00:00
|
|
|
const struct target_section
|
2003-06-07 23:50:23 +00:00
|
|
|
*end);
|
2000-03-21 22:37:42 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Free all memory allocated by
|
|
|
|
build_section_addr_info_from_section_table. */
|
2000-03-21 22:37:42 +00:00
|
|
|
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* cris-tdep.c: Fix function declaration indentation.
* dwarfread.c, gdbcore.h, gdbtypes.h, i386v-nat.c: Ditto.
* mips-tdep.c, monitor.h, parse.c, proc-utils.h: Ditto.
* rs6000-nat.c, ser-go32.c, somread.c, stabsread.c: Ditto.
* symfile.h, symtab.h, target.c, target.h, value.h: Ditto.
* xcoffread.c, config/pa/tm-hppa.h: Ditto.
* config/sparc/tm-sp64.h, config/sparc/tm-sparc.h: Ditto.
2003-01-19 04:06:47 +00:00
|
|
|
extern void free_section_addr_info (struct section_addr_info *);
|
2000-03-21 22:37:42 +00:00
|
|
|
|
|
|
|
|
2000-05-28 01:12:42 +00:00
|
|
|
extern struct partial_symtab *start_psymtab_common (struct objfile *,
|
|
|
|
struct section_offsets *,
|
2009-11-05 23:18:01 +00:00
|
|
|
const char *, CORE_ADDR,
|
2000-05-28 01:12:42 +00:00
|
|
|
struct partial_symbol **,
|
|
|
|
struct partial_symbol **);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Make a copy of the string at PTR with SIZE characters in the symbol
|
|
|
|
obstack (and add a null character at the end in the copy). Returns
|
|
|
|
the address of the copy. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2002-10-17 21:16:12 +00:00
|
|
|
extern char *obsavestring (const char *, int, struct obstack *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Concatenate strings S1, S2 and S3; return the new string. Space is
|
2004-02-07 Elena Zannoni <ezannoni@redhat.com>
* buildsym.c (free_pending_blocks, finish_block)
(record_pending_block, make_blockvector, end_symtab): Replace
symbol_obstack with objfile_obstack.
* coffread.c (process_coff_symbol, coff_read_struct_type)
(coff_read_enum_type): Ditto.
* cp-namespace.c (initialize_namespace_symtab)
(check_one_possible_namespace_symbol): Ditto.
* dwarf2read.c (new_symbol, dwarf2_const_value, macro_start_file)
(dwarf2_symbol_mark_computed): Ditto.
* dwarfread.c (enum_type, new_symbol, synthesize_typedef): Ditto.
* elfread.c (elf_symtab_read): Ditto.
* hpread.c (hpread_symfile_init, hpread_symfile_init)
(hpread_read_enum_type, hpread_read_function_type)
(hpread_read_doc_function_type, hpread_process_one_debug_symbol):
Ditto.
* jv-lang.c (get_java_class_symtab, add_class_symbol)
(java_link_class_type): Ditto.
* mdebugread.c (parse_symbol, psymtab_to_symtab_1, new_symtab)
(new_symbol): Ditto.
* minsyms.c (install_minimal_symbols): Ditto.
* objfiles.c (allocate_objfile): Remove init of symbol_obstack.
(terminate_minimal_symbol_table): Replace symbol_obstack with
objfile_obstack.
(free_objfile): Remove freeing of symbol_obstack.
* objfiles.h: Remove symbol_obstack field.
* pa64solib.c (add_to_solist): Replace symbol_obstack with
objfile_obstack.
* solib-sunos.c (allocate_rt_common_objfile): Remove init of
symbol_obstack.
(solib_add_common_symbols): Replace symbol_obstack with
objfile_obstack.
* somsolib.c (som_solib_add): Ditto.
* stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
(common_block_start, common_block_end): Ditto.
* symfile.c (reread_symbols): Remove freeing and init of
symbol_obstack.
(allocate_symtab): Rename symbol_obstack to objfile_obstack.
* symfile.h: Update comment.
* symmisc.c (print_objfile_statistics): Remove symbol_obstack
stats printing.
* symtab.c (symbol_set_names): Replace symbol_obstack with
objfile_obstack.
* symtab.h (struct general_symbol_info, struct minimal_symbol):
Update comments.
* xcoffread.c (read_xcoff_symtab, SYMBOL_DUP, SYMNAME_ALLOC)
(init_stringtab, xcoff_initial_scan): Replace symbol_obstack with
objfile_obstack.
2004-02-07 23:13:47 +00:00
|
|
|
found in the OBSTACKP */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2000-05-28 01:12:42 +00:00
|
|
|
extern char *obconcat (struct obstack *obstackp, const char *, const char *,
|
|
|
|
const char *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
/* Variables */
|
|
|
|
|
2001-10-30 04:05:36 +00:00
|
|
|
/* If non-zero, shared library symbols will be added automatically
|
|
|
|
when the inferior is created, new libraries are loaded, or when
|
|
|
|
attaching to the inferior. This is almost always what users will
|
|
|
|
want to have happen; but for very large programs, the startup time
|
|
|
|
will be excessive, and so if this is a problem, the user can clear
|
|
|
|
this flag and then add the shared library symbols as needed. Note
|
|
|
|
that there is a potential for confusion, since if the shared
|
|
|
|
library symbols are not loaded, commands like "info fun" will *not*
|
2003-06-07 23:50:23 +00:00
|
|
|
report all the functions that are actually present. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2001-10-30 04:05:36 +00:00
|
|
|
extern int auto_solib_add;
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2001-10-30 04:05:36 +00:00
|
|
|
/* For systems that support it, a threshold size in megabytes. If
|
|
|
|
automatically adding a new library's symbol table to those already
|
|
|
|
known to the debugger would cause the total shared library symbol
|
|
|
|
size to exceed this threshhold, then the shlib's symbols are not
|
|
|
|
added. The threshold is ignored if the user explicitly asks for a
|
2003-06-07 23:50:23 +00:00
|
|
|
shlib to be added, such as when using the "sharedlibrary" command. */
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2001-10-30 04:05:36 +00:00
|
|
|
extern int auto_solib_limit;
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
/* From symfile.c */
|
|
|
|
|
2008-01-03 04:23:46 +00:00
|
|
|
extern void set_initial_language (void);
|
|
|
|
|
2009-11-05 23:18:01 +00:00
|
|
|
extern struct partial_symtab *allocate_psymtab (const char *,
|
|
|
|
struct objfile *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2000-05-28 01:12:42 +00:00
|
|
|
extern void discard_psymtab (struct partial_symtab *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
* breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
* defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
* exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
* objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
2003-01-18 15:55:53 +00:00
|
|
|
extern void find_lowest_section (bfd *, asection *, void *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2000-05-28 01:12:42 +00:00
|
|
|
extern bfd *symfile_bfd_open (char *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2009-12-14 12:50:39 +00:00
|
|
|
extern bfd *bfd_open_maybe_remote (const char *);
|
|
|
|
|
2002-04-22 10:19:04 +00:00
|
|
|
extern int get_section_index (struct objfile *, char *);
|
|
|
|
|
1999-04-16 01:35:26 +00:00
|
|
|
/* Utility functions for overlay sections: */
|
2003-06-07 23:50:23 +00:00
|
|
|
extern enum overlay_debugging_state
|
|
|
|
{
|
|
|
|
ovly_off,
|
|
|
|
ovly_on,
|
2002-02-01 01:14:20 +00:00
|
|
|
ovly_auto
|
|
|
|
} overlay_debugging;
|
1999-04-16 01:35:26 +00:00
|
|
|
extern int overlay_cache_invalid;
|
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Return the "mapped" overlay section containing the PC. */
|
* breakpoint.h (struct bp_location): Change type of section
member to "struct obj_section *".
* tracepoint.h (struct tracepoint): Likewise.
* symtab.h (struct general_symbol_info): Replace bfd_section
member with obj_section.
(struct symtab_and_line): Change type of section member to
"struct obj_section *".
(SYMBOL_BFD_SECTION): Remove macro, replace by ...
(SYMBOL_OBJ_SECTION): ... this.
* minsym.c (prim_record_minimal_symbol_and_info): Record symbol
section as obj_section instead of bfd_section.
* ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
directly instead of looking of obj_section from bfd_section.
* objfiles.h (find_pc_sect_section): Remove.
* objfiles.c (find_pc_sect_section): Remove.
(find_pc_section): Inline find_pc_sect_section code.
* symfile.h (find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(section_is_overlay, section_is_mapped): Change type of section
argument to struct obj_section *.
(pc_in_mapped_range, pc_in_unmapped_range): Likewise.
(overlay_mapped_address, overlay_unmapped_address): Likewise.
(symbol_overlayed_address): Likewise.
* symtab.h (symbol_overlayed_address): Likewise.
* symfile.c (overlay_is_mapped): Remove.
(section_is_mapped): Inline overlay_is_mapped code. Update.
(overlay_invalidate_all): Update.
(section_is_overlay): Change section argument to type
"struct obj_section *". Use bfd_ methods.
(pc_in_unmapped_range): Likewise. Handle relocated sections.
(pc_in_mapped_range): Likewise. Handle relocated sections.
(sections_overlap): Likewise.
(overlay_unmapped_address): Likewise.
(overlay_mapped_address): Likewise.
(symbol_overlayed_address): Likewise.
(find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(list_overlays_command): Update.
(map_overlay_command, unmap_overlay_command): Update.
(simple_overlay_update): Update.
* block.h (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* block.c (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_sect_function): Likewise.
* breakpoint.c (describe_other_breakpoints): Likewise.
(breakpoint_has_pc, check_duplicates_for): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_minimal_symbol_by_pc_section): Likewise.
* symtab.c (find_pc_sect_psymtab_closer): Likewise.
(find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
find_pc_sect_line, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_partial_function): Update to section
type changes. No longer call find_pc_sect_section.
(cache_pc_function_section): Change to type "struct obj_section *".
* breakpoint.c (resolve_sal_pc): Update to section type changes.
* exec.c (xfer_memory): Likewise.
* findvar.c (read_var_value): Likewise.
* infcmd.c (jump_command): Likewise.
* linespec.c (minsym_found): Likewise.
* maint.c (maintenance_translate_address): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_solib_trampoline_symbol_by_pc): Likewise.
* parse.c (write_exp_msymbol): Likewise.
* printcmd.c (build_address_symbolic): Likewise.
(address_info, sym_info): Likewise.
* symmisc.c (dump_msymbols, print_symbol): Likewise.
* symtab.c (fixup_section): Likewise.
(fixup_symbol_section, fixup_psymbol_section): Likewise.
(find_pc_line, find_function_start_sal): Likewise.
* target.c (memory_xfer_partial): Likewise.
* hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
* spu-tdep.c (spu_overlay_update): Likewise.
2008-09-05 11:37:18 +00:00
|
|
|
extern struct obj_section *find_pc_mapped_section (CORE_ADDR);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Return any overlay section containing the PC (even in its LMA
|
|
|
|
region). */
|
* breakpoint.h (struct bp_location): Change type of section
member to "struct obj_section *".
* tracepoint.h (struct tracepoint): Likewise.
* symtab.h (struct general_symbol_info): Replace bfd_section
member with obj_section.
(struct symtab_and_line): Change type of section member to
"struct obj_section *".
(SYMBOL_BFD_SECTION): Remove macro, replace by ...
(SYMBOL_OBJ_SECTION): ... this.
* minsym.c (prim_record_minimal_symbol_and_info): Record symbol
section as obj_section instead of bfd_section.
* ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
directly instead of looking of obj_section from bfd_section.
* objfiles.h (find_pc_sect_section): Remove.
* objfiles.c (find_pc_sect_section): Remove.
(find_pc_section): Inline find_pc_sect_section code.
* symfile.h (find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(section_is_overlay, section_is_mapped): Change type of section
argument to struct obj_section *.
(pc_in_mapped_range, pc_in_unmapped_range): Likewise.
(overlay_mapped_address, overlay_unmapped_address): Likewise.
(symbol_overlayed_address): Likewise.
* symtab.h (symbol_overlayed_address): Likewise.
* symfile.c (overlay_is_mapped): Remove.
(section_is_mapped): Inline overlay_is_mapped code. Update.
(overlay_invalidate_all): Update.
(section_is_overlay): Change section argument to type
"struct obj_section *". Use bfd_ methods.
(pc_in_unmapped_range): Likewise. Handle relocated sections.
(pc_in_mapped_range): Likewise. Handle relocated sections.
(sections_overlap): Likewise.
(overlay_unmapped_address): Likewise.
(overlay_mapped_address): Likewise.
(symbol_overlayed_address): Likewise.
(find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(list_overlays_command): Update.
(map_overlay_command, unmap_overlay_command): Update.
(simple_overlay_update): Update.
* block.h (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* block.c (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_sect_function): Likewise.
* breakpoint.c (describe_other_breakpoints): Likewise.
(breakpoint_has_pc, check_duplicates_for): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_minimal_symbol_by_pc_section): Likewise.
* symtab.c (find_pc_sect_psymtab_closer): Likewise.
(find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
find_pc_sect_line, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_partial_function): Update to section
type changes. No longer call find_pc_sect_section.
(cache_pc_function_section): Change to type "struct obj_section *".
* breakpoint.c (resolve_sal_pc): Update to section type changes.
* exec.c (xfer_memory): Likewise.
* findvar.c (read_var_value): Likewise.
* infcmd.c (jump_command): Likewise.
* linespec.c (minsym_found): Likewise.
* maint.c (maintenance_translate_address): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_solib_trampoline_symbol_by_pc): Likewise.
* parse.c (write_exp_msymbol): Likewise.
* printcmd.c (build_address_symbolic): Likewise.
(address_info, sym_info): Likewise.
* symmisc.c (dump_msymbols, print_symbol): Likewise.
* symtab.c (fixup_section): Likewise.
(fixup_symbol_section, fixup_psymbol_section): Likewise.
(find_pc_line, find_function_start_sal): Likewise.
* target.c (memory_xfer_partial): Likewise.
* hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
* spu-tdep.c (spu_overlay_update): Likewise.
2008-09-05 11:37:18 +00:00
|
|
|
extern struct obj_section *find_pc_overlay (CORE_ADDR);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Return true if the section is an overlay. */
|
* breakpoint.h (struct bp_location): Change type of section
member to "struct obj_section *".
* tracepoint.h (struct tracepoint): Likewise.
* symtab.h (struct general_symbol_info): Replace bfd_section
member with obj_section.
(struct symtab_and_line): Change type of section member to
"struct obj_section *".
(SYMBOL_BFD_SECTION): Remove macro, replace by ...
(SYMBOL_OBJ_SECTION): ... this.
* minsym.c (prim_record_minimal_symbol_and_info): Record symbol
section as obj_section instead of bfd_section.
* ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
directly instead of looking of obj_section from bfd_section.
* objfiles.h (find_pc_sect_section): Remove.
* objfiles.c (find_pc_sect_section): Remove.
(find_pc_section): Inline find_pc_sect_section code.
* symfile.h (find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(section_is_overlay, section_is_mapped): Change type of section
argument to struct obj_section *.
(pc_in_mapped_range, pc_in_unmapped_range): Likewise.
(overlay_mapped_address, overlay_unmapped_address): Likewise.
(symbol_overlayed_address): Likewise.
* symtab.h (symbol_overlayed_address): Likewise.
* symfile.c (overlay_is_mapped): Remove.
(section_is_mapped): Inline overlay_is_mapped code. Update.
(overlay_invalidate_all): Update.
(section_is_overlay): Change section argument to type
"struct obj_section *". Use bfd_ methods.
(pc_in_unmapped_range): Likewise. Handle relocated sections.
(pc_in_mapped_range): Likewise. Handle relocated sections.
(sections_overlap): Likewise.
(overlay_unmapped_address): Likewise.
(overlay_mapped_address): Likewise.
(symbol_overlayed_address): Likewise.
(find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(list_overlays_command): Update.
(map_overlay_command, unmap_overlay_command): Update.
(simple_overlay_update): Update.
* block.h (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* block.c (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_sect_function): Likewise.
* breakpoint.c (describe_other_breakpoints): Likewise.
(breakpoint_has_pc, check_duplicates_for): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_minimal_symbol_by_pc_section): Likewise.
* symtab.c (find_pc_sect_psymtab_closer): Likewise.
(find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
find_pc_sect_line, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_partial_function): Update to section
type changes. No longer call find_pc_sect_section.
(cache_pc_function_section): Change to type "struct obj_section *".
* breakpoint.c (resolve_sal_pc): Update to section type changes.
* exec.c (xfer_memory): Likewise.
* findvar.c (read_var_value): Likewise.
* infcmd.c (jump_command): Likewise.
* linespec.c (minsym_found): Likewise.
* maint.c (maintenance_translate_address): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_solib_trampoline_symbol_by_pc): Likewise.
* parse.c (write_exp_msymbol): Likewise.
* printcmd.c (build_address_symbolic): Likewise.
(address_info, sym_info): Likewise.
* symmisc.c (dump_msymbols, print_symbol): Likewise.
* symtab.c (fixup_section): Likewise.
(fixup_symbol_section, fixup_psymbol_section): Likewise.
(find_pc_line, find_function_start_sal): Likewise.
* target.c (memory_xfer_partial): Likewise.
* hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
* spu-tdep.c (spu_overlay_update): Likewise.
2008-09-05 11:37:18 +00:00
|
|
|
extern int section_is_overlay (struct obj_section *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Return true if the overlay section is currently "mapped". */
|
* breakpoint.h (struct bp_location): Change type of section
member to "struct obj_section *".
* tracepoint.h (struct tracepoint): Likewise.
* symtab.h (struct general_symbol_info): Replace bfd_section
member with obj_section.
(struct symtab_and_line): Change type of section member to
"struct obj_section *".
(SYMBOL_BFD_SECTION): Remove macro, replace by ...
(SYMBOL_OBJ_SECTION): ... this.
* minsym.c (prim_record_minimal_symbol_and_info): Record symbol
section as obj_section instead of bfd_section.
* ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
directly instead of looking of obj_section from bfd_section.
* objfiles.h (find_pc_sect_section): Remove.
* objfiles.c (find_pc_sect_section): Remove.
(find_pc_section): Inline find_pc_sect_section code.
* symfile.h (find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(section_is_overlay, section_is_mapped): Change type of section
argument to struct obj_section *.
(pc_in_mapped_range, pc_in_unmapped_range): Likewise.
(overlay_mapped_address, overlay_unmapped_address): Likewise.
(symbol_overlayed_address): Likewise.
* symtab.h (symbol_overlayed_address): Likewise.
* symfile.c (overlay_is_mapped): Remove.
(section_is_mapped): Inline overlay_is_mapped code. Update.
(overlay_invalidate_all): Update.
(section_is_overlay): Change section argument to type
"struct obj_section *". Use bfd_ methods.
(pc_in_unmapped_range): Likewise. Handle relocated sections.
(pc_in_mapped_range): Likewise. Handle relocated sections.
(sections_overlap): Likewise.
(overlay_unmapped_address): Likewise.
(overlay_mapped_address): Likewise.
(symbol_overlayed_address): Likewise.
(find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(list_overlays_command): Update.
(map_overlay_command, unmap_overlay_command): Update.
(simple_overlay_update): Update.
* block.h (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* block.c (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_sect_function): Likewise.
* breakpoint.c (describe_other_breakpoints): Likewise.
(breakpoint_has_pc, check_duplicates_for): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_minimal_symbol_by_pc_section): Likewise.
* symtab.c (find_pc_sect_psymtab_closer): Likewise.
(find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
find_pc_sect_line, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_partial_function): Update to section
type changes. No longer call find_pc_sect_section.
(cache_pc_function_section): Change to type "struct obj_section *".
* breakpoint.c (resolve_sal_pc): Update to section type changes.
* exec.c (xfer_memory): Likewise.
* findvar.c (read_var_value): Likewise.
* infcmd.c (jump_command): Likewise.
* linespec.c (minsym_found): Likewise.
* maint.c (maintenance_translate_address): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_solib_trampoline_symbol_by_pc): Likewise.
* parse.c (write_exp_msymbol): Likewise.
* printcmd.c (build_address_symbolic): Likewise.
(address_info, sym_info): Likewise.
* symmisc.c (dump_msymbols, print_symbol): Likewise.
* symtab.c (fixup_section): Likewise.
(fixup_symbol_section, fixup_psymbol_section): Likewise.
(find_pc_line, find_function_start_sal): Likewise.
* target.c (memory_xfer_partial): Likewise.
* hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
* spu-tdep.c (spu_overlay_update): Likewise.
2008-09-05 11:37:18 +00:00
|
|
|
extern int section_is_mapped (struct obj_section *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Return true if pc belongs to section's VMA. */
|
* breakpoint.h (struct bp_location): Change type of section
member to "struct obj_section *".
* tracepoint.h (struct tracepoint): Likewise.
* symtab.h (struct general_symbol_info): Replace bfd_section
member with obj_section.
(struct symtab_and_line): Change type of section member to
"struct obj_section *".
(SYMBOL_BFD_SECTION): Remove macro, replace by ...
(SYMBOL_OBJ_SECTION): ... this.
* minsym.c (prim_record_minimal_symbol_and_info): Record symbol
section as obj_section instead of bfd_section.
* ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
directly instead of looking of obj_section from bfd_section.
* objfiles.h (find_pc_sect_section): Remove.
* objfiles.c (find_pc_sect_section): Remove.
(find_pc_section): Inline find_pc_sect_section code.
* symfile.h (find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(section_is_overlay, section_is_mapped): Change type of section
argument to struct obj_section *.
(pc_in_mapped_range, pc_in_unmapped_range): Likewise.
(overlay_mapped_address, overlay_unmapped_address): Likewise.
(symbol_overlayed_address): Likewise.
* symtab.h (symbol_overlayed_address): Likewise.
* symfile.c (overlay_is_mapped): Remove.
(section_is_mapped): Inline overlay_is_mapped code. Update.
(overlay_invalidate_all): Update.
(section_is_overlay): Change section argument to type
"struct obj_section *". Use bfd_ methods.
(pc_in_unmapped_range): Likewise. Handle relocated sections.
(pc_in_mapped_range): Likewise. Handle relocated sections.
(sections_overlap): Likewise.
(overlay_unmapped_address): Likewise.
(overlay_mapped_address): Likewise.
(symbol_overlayed_address): Likewise.
(find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(list_overlays_command): Update.
(map_overlay_command, unmap_overlay_command): Update.
(simple_overlay_update): Update.
* block.h (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* block.c (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_sect_function): Likewise.
* breakpoint.c (describe_other_breakpoints): Likewise.
(breakpoint_has_pc, check_duplicates_for): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_minimal_symbol_by_pc_section): Likewise.
* symtab.c (find_pc_sect_psymtab_closer): Likewise.
(find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
find_pc_sect_line, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_partial_function): Update to section
type changes. No longer call find_pc_sect_section.
(cache_pc_function_section): Change to type "struct obj_section *".
* breakpoint.c (resolve_sal_pc): Update to section type changes.
* exec.c (xfer_memory): Likewise.
* findvar.c (read_var_value): Likewise.
* infcmd.c (jump_command): Likewise.
* linespec.c (minsym_found): Likewise.
* maint.c (maintenance_translate_address): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_solib_trampoline_symbol_by_pc): Likewise.
* parse.c (write_exp_msymbol): Likewise.
* printcmd.c (build_address_symbolic): Likewise.
(address_info, sym_info): Likewise.
* symmisc.c (dump_msymbols, print_symbol): Likewise.
* symtab.c (fixup_section): Likewise.
(fixup_symbol_section, fixup_psymbol_section): Likewise.
(find_pc_line, find_function_start_sal): Likewise.
* target.c (memory_xfer_partial): Likewise.
* hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
* spu-tdep.c (spu_overlay_update): Likewise.
2008-09-05 11:37:18 +00:00
|
|
|
extern CORE_ADDR pc_in_mapped_range (CORE_ADDR, struct obj_section *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Return true if pc belongs to section's LMA. */
|
* breakpoint.h (struct bp_location): Change type of section
member to "struct obj_section *".
* tracepoint.h (struct tracepoint): Likewise.
* symtab.h (struct general_symbol_info): Replace bfd_section
member with obj_section.
(struct symtab_and_line): Change type of section member to
"struct obj_section *".
(SYMBOL_BFD_SECTION): Remove macro, replace by ...
(SYMBOL_OBJ_SECTION): ... this.
* minsym.c (prim_record_minimal_symbol_and_info): Record symbol
section as obj_section instead of bfd_section.
* ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
directly instead of looking of obj_section from bfd_section.
* objfiles.h (find_pc_sect_section): Remove.
* objfiles.c (find_pc_sect_section): Remove.
(find_pc_section): Inline find_pc_sect_section code.
* symfile.h (find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(section_is_overlay, section_is_mapped): Change type of section
argument to struct obj_section *.
(pc_in_mapped_range, pc_in_unmapped_range): Likewise.
(overlay_mapped_address, overlay_unmapped_address): Likewise.
(symbol_overlayed_address): Likewise.
* symtab.h (symbol_overlayed_address): Likewise.
* symfile.c (overlay_is_mapped): Remove.
(section_is_mapped): Inline overlay_is_mapped code. Update.
(overlay_invalidate_all): Update.
(section_is_overlay): Change section argument to type
"struct obj_section *". Use bfd_ methods.
(pc_in_unmapped_range): Likewise. Handle relocated sections.
(pc_in_mapped_range): Likewise. Handle relocated sections.
(sections_overlap): Likewise.
(overlay_unmapped_address): Likewise.
(overlay_mapped_address): Likewise.
(symbol_overlayed_address): Likewise.
(find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(list_overlays_command): Update.
(map_overlay_command, unmap_overlay_command): Update.
(simple_overlay_update): Update.
* block.h (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* block.c (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_sect_function): Likewise.
* breakpoint.c (describe_other_breakpoints): Likewise.
(breakpoint_has_pc, check_duplicates_for): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_minimal_symbol_by_pc_section): Likewise.
* symtab.c (find_pc_sect_psymtab_closer): Likewise.
(find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
find_pc_sect_line, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_partial_function): Update to section
type changes. No longer call find_pc_sect_section.
(cache_pc_function_section): Change to type "struct obj_section *".
* breakpoint.c (resolve_sal_pc): Update to section type changes.
* exec.c (xfer_memory): Likewise.
* findvar.c (read_var_value): Likewise.
* infcmd.c (jump_command): Likewise.
* linespec.c (minsym_found): Likewise.
* maint.c (maintenance_translate_address): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_solib_trampoline_symbol_by_pc): Likewise.
* parse.c (write_exp_msymbol): Likewise.
* printcmd.c (build_address_symbolic): Likewise.
(address_info, sym_info): Likewise.
* symmisc.c (dump_msymbols, print_symbol): Likewise.
* symtab.c (fixup_section): Likewise.
(fixup_symbol_section, fixup_psymbol_section): Likewise.
(find_pc_line, find_function_start_sal): Likewise.
* target.c (memory_xfer_partial): Likewise.
* hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
* spu-tdep.c (spu_overlay_update): Likewise.
2008-09-05 11:37:18 +00:00
|
|
|
extern CORE_ADDR pc_in_unmapped_range (CORE_ADDR, struct obj_section *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Map an address from a section's LMA to its VMA. */
|
* breakpoint.h (struct bp_location): Change type of section
member to "struct obj_section *".
* tracepoint.h (struct tracepoint): Likewise.
* symtab.h (struct general_symbol_info): Replace bfd_section
member with obj_section.
(struct symtab_and_line): Change type of section member to
"struct obj_section *".
(SYMBOL_BFD_SECTION): Remove macro, replace by ...
(SYMBOL_OBJ_SECTION): ... this.
* minsym.c (prim_record_minimal_symbol_and_info): Record symbol
section as obj_section instead of bfd_section.
* ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
directly instead of looking of obj_section from bfd_section.
* objfiles.h (find_pc_sect_section): Remove.
* objfiles.c (find_pc_sect_section): Remove.
(find_pc_section): Inline find_pc_sect_section code.
* symfile.h (find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(section_is_overlay, section_is_mapped): Change type of section
argument to struct obj_section *.
(pc_in_mapped_range, pc_in_unmapped_range): Likewise.
(overlay_mapped_address, overlay_unmapped_address): Likewise.
(symbol_overlayed_address): Likewise.
* symtab.h (symbol_overlayed_address): Likewise.
* symfile.c (overlay_is_mapped): Remove.
(section_is_mapped): Inline overlay_is_mapped code. Update.
(overlay_invalidate_all): Update.
(section_is_overlay): Change section argument to type
"struct obj_section *". Use bfd_ methods.
(pc_in_unmapped_range): Likewise. Handle relocated sections.
(pc_in_mapped_range): Likewise. Handle relocated sections.
(sections_overlap): Likewise.
(overlay_unmapped_address): Likewise.
(overlay_mapped_address): Likewise.
(symbol_overlayed_address): Likewise.
(find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(list_overlays_command): Update.
(map_overlay_command, unmap_overlay_command): Update.
(simple_overlay_update): Update.
* block.h (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* block.c (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_sect_function): Likewise.
* breakpoint.c (describe_other_breakpoints): Likewise.
(breakpoint_has_pc, check_duplicates_for): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_minimal_symbol_by_pc_section): Likewise.
* symtab.c (find_pc_sect_psymtab_closer): Likewise.
(find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
find_pc_sect_line, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_partial_function): Update to section
type changes. No longer call find_pc_sect_section.
(cache_pc_function_section): Change to type "struct obj_section *".
* breakpoint.c (resolve_sal_pc): Update to section type changes.
* exec.c (xfer_memory): Likewise.
* findvar.c (read_var_value): Likewise.
* infcmd.c (jump_command): Likewise.
* linespec.c (minsym_found): Likewise.
* maint.c (maintenance_translate_address): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_solib_trampoline_symbol_by_pc): Likewise.
* parse.c (write_exp_msymbol): Likewise.
* printcmd.c (build_address_symbolic): Likewise.
(address_info, sym_info): Likewise.
* symmisc.c (dump_msymbols, print_symbol): Likewise.
* symtab.c (fixup_section): Likewise.
(fixup_symbol_section, fixup_psymbol_section): Likewise.
(find_pc_line, find_function_start_sal): Likewise.
* target.c (memory_xfer_partial): Likewise.
* hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
* spu-tdep.c (spu_overlay_update): Likewise.
2008-09-05 11:37:18 +00:00
|
|
|
extern CORE_ADDR overlay_mapped_address (CORE_ADDR, struct obj_section *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Map an address from a section's VMA to its LMA. */
|
* breakpoint.h (struct bp_location): Change type of section
member to "struct obj_section *".
* tracepoint.h (struct tracepoint): Likewise.
* symtab.h (struct general_symbol_info): Replace bfd_section
member with obj_section.
(struct symtab_and_line): Change type of section member to
"struct obj_section *".
(SYMBOL_BFD_SECTION): Remove macro, replace by ...
(SYMBOL_OBJ_SECTION): ... this.
* minsym.c (prim_record_minimal_symbol_and_info): Record symbol
section as obj_section instead of bfd_section.
* ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
directly instead of looking of obj_section from bfd_section.
* objfiles.h (find_pc_sect_section): Remove.
* objfiles.c (find_pc_sect_section): Remove.
(find_pc_section): Inline find_pc_sect_section code.
* symfile.h (find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(section_is_overlay, section_is_mapped): Change type of section
argument to struct obj_section *.
(pc_in_mapped_range, pc_in_unmapped_range): Likewise.
(overlay_mapped_address, overlay_unmapped_address): Likewise.
(symbol_overlayed_address): Likewise.
* symtab.h (symbol_overlayed_address): Likewise.
* symfile.c (overlay_is_mapped): Remove.
(section_is_mapped): Inline overlay_is_mapped code. Update.
(overlay_invalidate_all): Update.
(section_is_overlay): Change section argument to type
"struct obj_section *". Use bfd_ methods.
(pc_in_unmapped_range): Likewise. Handle relocated sections.
(pc_in_mapped_range): Likewise. Handle relocated sections.
(sections_overlap): Likewise.
(overlay_unmapped_address): Likewise.
(overlay_mapped_address): Likewise.
(symbol_overlayed_address): Likewise.
(find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(list_overlays_command): Update.
(map_overlay_command, unmap_overlay_command): Update.
(simple_overlay_update): Update.
* block.h (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* block.c (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_sect_function): Likewise.
* breakpoint.c (describe_other_breakpoints): Likewise.
(breakpoint_has_pc, check_duplicates_for): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_minimal_symbol_by_pc_section): Likewise.
* symtab.c (find_pc_sect_psymtab_closer): Likewise.
(find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
find_pc_sect_line, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_partial_function): Update to section
type changes. No longer call find_pc_sect_section.
(cache_pc_function_section): Change to type "struct obj_section *".
* breakpoint.c (resolve_sal_pc): Update to section type changes.
* exec.c (xfer_memory): Likewise.
* findvar.c (read_var_value): Likewise.
* infcmd.c (jump_command): Likewise.
* linespec.c (minsym_found): Likewise.
* maint.c (maintenance_translate_address): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_solib_trampoline_symbol_by_pc): Likewise.
* parse.c (write_exp_msymbol): Likewise.
* printcmd.c (build_address_symbolic): Likewise.
(address_info, sym_info): Likewise.
* symmisc.c (dump_msymbols, print_symbol): Likewise.
* symtab.c (fixup_section): Likewise.
(fixup_symbol_section, fixup_psymbol_section): Likewise.
(find_pc_line, find_function_start_sal): Likewise.
* target.c (memory_xfer_partial): Likewise.
* hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
* spu-tdep.c (spu_overlay_update): Likewise.
2008-09-05 11:37:18 +00:00
|
|
|
extern CORE_ADDR overlay_unmapped_address (CORE_ADDR, struct obj_section *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Convert an address in an overlay section (force into VMA range). */
|
* breakpoint.h (struct bp_location): Change type of section
member to "struct obj_section *".
* tracepoint.h (struct tracepoint): Likewise.
* symtab.h (struct general_symbol_info): Replace bfd_section
member with obj_section.
(struct symtab_and_line): Change type of section member to
"struct obj_section *".
(SYMBOL_BFD_SECTION): Remove macro, replace by ...
(SYMBOL_OBJ_SECTION): ... this.
* minsym.c (prim_record_minimal_symbol_and_info): Record symbol
section as obj_section instead of bfd_section.
* ada-lang.c (ada_decode_symbol): Use gsymbol->obj_section
directly instead of looking of obj_section from bfd_section.
* objfiles.h (find_pc_sect_section): Remove.
* objfiles.c (find_pc_sect_section): Remove.
(find_pc_section): Inline find_pc_sect_section code.
* symfile.h (find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(section_is_overlay, section_is_mapped): Change type of section
argument to struct obj_section *.
(pc_in_mapped_range, pc_in_unmapped_range): Likewise.
(overlay_mapped_address, overlay_unmapped_address): Likewise.
(symbol_overlayed_address): Likewise.
* symtab.h (symbol_overlayed_address): Likewise.
* symfile.c (overlay_is_mapped): Remove.
(section_is_mapped): Inline overlay_is_mapped code. Update.
(overlay_invalidate_all): Update.
(section_is_overlay): Change section argument to type
"struct obj_section *". Use bfd_ methods.
(pc_in_unmapped_range): Likewise. Handle relocated sections.
(pc_in_mapped_range): Likewise. Handle relocated sections.
(sections_overlap): Likewise.
(overlay_unmapped_address): Likewise.
(overlay_mapped_address): Likewise.
(symbol_overlayed_address): Likewise.
(find_pc_overlay): Return struct obj_section *.
(find_pc_mapped_section): Likewise.
(list_overlays_command): Update.
(map_overlay_command, unmap_overlay_command): Update.
(simple_overlay_update): Update.
* block.h (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* block.c (blockvector_for_pc_sect): Change section argument
to type "struct obj_section *".
(block_for_pc_sect): Likewise.
* symtab.h (find_pc_sect_function, find_pc_sect_psymtab,
find_pc_sect_symtab, find_pc_sect_psymbol, find_pc_sect_line,
lookup_minimal_symbol_by_pc_section, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_sect_function): Likewise.
* breakpoint.c (describe_other_breakpoints): Likewise.
(breakpoint_has_pc, check_duplicates_for): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_minimal_symbol_by_pc_section): Likewise.
* symtab.c (find_pc_sect_psymtab_closer): Likewise.
(find_pc_sect_psymtab, find_pc_sect_psymbol, find_pc_sect_symtab,
find_pc_sect_line, find_function_start_pc): Likewise.
(matching_bfd_sections): Rename to ...
(matching_obj_sections): ... this. Update argument types.
* blockframe.c (find_pc_partial_function): Update to section
type changes. No longer call find_pc_sect_section.
(cache_pc_function_section): Change to type "struct obj_section *".
* breakpoint.c (resolve_sal_pc): Update to section type changes.
* exec.c (xfer_memory): Likewise.
* findvar.c (read_var_value): Likewise.
* infcmd.c (jump_command): Likewise.
* linespec.c (minsym_found): Likewise.
* maint.c (maintenance_translate_address): Likewise.
* minsyms.c (lookup_minimal_symbol_by_pc_section_1): Likewise.
(lookup_solib_trampoline_symbol_by_pc): Likewise.
* parse.c (write_exp_msymbol): Likewise.
* printcmd.c (build_address_symbolic): Likewise.
(address_info, sym_info): Likewise.
* symmisc.c (dump_msymbols, print_symbol): Likewise.
* symtab.c (fixup_section): Likewise.
(fixup_symbol_section, fixup_psymbol_section): Likewise.
(find_pc_line, find_function_start_sal): Likewise.
* target.c (memory_xfer_partial): Likewise.
* hppa-hpux-tdep.c (hppa64_hpux_in_solib_call_trampoline): Likewise.
* spu-tdep.c (spu_overlay_update): Likewise.
2008-09-05 11:37:18 +00:00
|
|
|
extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, struct obj_section *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Load symbols from a file. */
|
2001-01-27 00:43:26 +00:00
|
|
|
extern void symbol_file_add_main (char *args, int from_tty);
|
|
|
|
|
2003-06-07 23:50:23 +00:00
|
|
|
/* Clear GDB symbol tables. */
|
2001-01-27 00:43:26 +00:00
|
|
|
extern void symbol_file_clear (int from_tty);
|
|
|
|
|
2007-05-11 19:57:17 +00:00
|
|
|
/* Default overlay update function. */
|
|
|
|
extern void simple_overlay_update (struct obj_section *);
|
|
|
|
|
2010-02-03 14:13:16 +00:00
|
|
|
extern bfd_byte *symfile_relocate_debug_section (struct objfile *, asection *,
|
|
|
|
bfd_byte *);
|
2003-01-31 19:22:18 +00:00
|
|
|
|
2007-06-18 15:46:38 +00:00
|
|
|
extern int symfile_map_offsets_to_segments (bfd *,
|
|
|
|
struct symfile_segment_data *,
|
|
|
|
struct section_offsets *,
|
|
|
|
int, const CORE_ADDR *);
|
|
|
|
struct symfile_segment_data *get_symfile_segment_data (bfd *abfd);
|
|
|
|
void free_symfile_segment_data (struct symfile_segment_data *data);
|
|
|
|
|
gdb
* xcoffread.c: Include psymtab.h.
(xcoff_sym_fns): Update.
* symtab.h (struct partial_symbol): Remove.
(PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.
(struct partial_symtab): Remove.
(PSYMTAB_TO_SYMTAB): Remove.
(lookup_partial_symbol, lookup_partial_symtab, find_pc_psymtab)
(find_pc_sect_psymtab): Remove.
(find_pc_sect_symtab_via_partial): Declare.
(find_pc_psymtab, find_pc_sect_psymbol, psymtab_to_symtab)
(find_main_psymtab): Remove.
(find_main_filename): Declare.
(fixup_psymbol_section): Remove.
(fixup_section): Declare.
* symtab.c: Include psymtab.h.
(lookup_symtab): Use lookup_symtab method.
(lookup_partial_symtab): Remove.
(find_pc_sect_psymtab_closer): Remove.
(find_pc_sect_psymtab): Remove.
(find_pc_sect_symtab_via_partial): New function.
(find_pc_psymtab, find_pc_sect_psymbol, find_pc_psymbol): Remove.
(fixup_section): No longer static.
(fixup_psymbol_section): Remove.
(lookup_symbol_aux): Use lookup_symbol_aux_quick.
(lookup_global_symbol_from_objfile): Likewise.
(lookup_symbol_aux_psymtabs): Remove.
(lookup_symbol_aux_quick): New function.
(lookup_symbol_global): Use lookup_symbol_aux_quick.
(lookup_partial_symbol): Remove.
(basic_lookup_transparent_type_quick): New function.
(basic_lookup_transparent_type): Use it.
(find_main_psymtab): Remove.
(find_main_filename): New function.
(find_pc_sect_symtab): Use find_pc_sect_symtab method.
(find_line_symtab): Use expand_symtabs_with_filename method.
(output_partial_symbol_filename): New function.
(sources_info): Use map_partial_symbol_filenames.
(struct search_symbols_data): New type.
(search_symbols_file_matches): New function.
(search_symbols_name_matches): Likewise.
(search_symbols): Use expand_symtabs_matching method.
(struct add_name_data): Rename from add_macro_name_data.
(add_macro_name): Update.
(add_partial_symbol_name): New function.
(default_make_symbol_completion_list): Use
map_partial_symbol_names.
(struct add_partial_symbol_name): New type.
(maybe_add_partial_symtab_filename): New function.
(make_source_files_completion_list): Use
map_partial_symbol_filenames.
(expand_line_sal): Use expand_symtabs_with_filename method.
* symmisc.c: Include psymtab.h.
(print_objfile_statistics): Use print_stats method.
(dump_objfile): Use dump method.
(dump_psymtab, maintenance_print_psymbols)
(maintenance_info_psymtabs, maintenance_check_symtabs)
(extend_psymbol_list): Remove.
* symfile.h (struct quick_symbol_functions): New struct.
(struct sym_fns) <qf>: New field.
(sort_pst_symbols): Remove.
(increment_reading_symtab): Declare.
* symfile.c: Include psymtab.h.
(compare_psymbols, sort_pst_symbols): Remove.
(psymtab_to_symtab): Remove.
(increment_reading_symtab): New function.
(symbol_file_add_with_addrs_or_offsets): Use expand_all_symtabs
method.
(set_initial_language): Use find_main_filename.
(allocate_psymtab, discard_psymtab, cashier_psymtab): Remove.
(free_named_symtabs): Remove unused code.
(start_psymtab_common, add_psymbol_to_bcache)
(append_psymbol_to_list, add_psymbol_to_list, init_psymbol_list):
Remove.
* stack.c: Include psymtab.h, symfile.h.
(backtrace_command_1): Use find_pc_sect_symtab_via_partial.
* source.h (psymtab_to_fullname): Don't declare.
* source.c: Include psymtab.h.
(select_source_symtab): Use find_last_source_symtab method.
(forget_cached_source_info): Use forget_cached_source_info
method.
(find_and_open_source): No longer static.
(psymtab_to_fullname): Remove.
* somread.c: Include psymtab.h.
(som_sym_fns): Update.
* psympriv.h: New file.
* psymtab.h: New file.
* psymtab.c: New file.
* objfiles.h: (ALL_OBJFILE_PSYMTABS): Remove.
(ALL_PSYMTABS, ALL_PSPACE_PSYMTABS): Likewise.
* objfiles.c: Include psymtab.h.
(objfile_relocate1): Use relocate method.
(objfile_has_partial_symbols): Use has_symbols method.
* mipsread.c: Include psymtab.h.
(ecoff_sym_fns): Update.
* mi/mi-cmd-file.c: Include psymtab.h.
(print_partial_file_name): New function.
(mi_cmd_file_list_exec_source_files): Use
map_partial_symbol_filenames.
* mdebugread.c: Include psympriv.h.
* machoread.c: Include psympriv.h.
(macho_sym_fns): Update.
* m2-exp.y (yylex): Use lookup_symtab.
* elfread.c: Include psympriv.h.
(elf_sym_fns): Update.
* dwarf2read.c: Include psympriv.h.
* dbxread.c: Include psympriv.h.
(aout_sym_fns): Update.
* cp-support.c: Include psymtab.h.
(read_in_psymtabs): Remove.
(make_symbol_overload_list_qualified): Use
expand_symtabs_for_function method.
* coffread.c: Include psympriv.h.
(coff_sym_fns): Update.
* blockframe.c: Include psymtab.h.
(find_pc_partial_function): Use find_pc_sect_symtab method.
* ada-lang.h (ada_update_initial_language): Update.
* ada-lang.c: Include psymtab.h.
(ada_update_initial_language): Remove 'main_pst' argument.
(ada_lookup_partial_symbol): Remove.
(struct ada_psym_data): New type.
(ada_add_psyms): New function.
(ada_add_non_local_symbols): Use map_ada_symtabs method.
(struct add_partial_datum): New type.
(ada_add_partial_symbol_completions): New function.
(ada_make_symbol_completion_list): Use map_partial_symbol_names.
(ada_exception_support_info_sniffer): Update.
* Makefile.in (SFILES): Add psymtab.c.
(COMMON_OBS): Add psymtab.o.
(HFILES_NO_SRCDIR): Add psymtab.h, psympriv.h.
gdb/doc
* gdbint.texinfo (Symbol Handling): Update.
2010-03-10 18:20:08 +00:00
|
|
|
extern struct cleanup *increment_reading_symtab (void);
|
|
|
|
|
1999-04-16 01:35:26 +00:00
|
|
|
/* From dwarf2read.c */
|
|
|
|
|
* dwarf2read.c (dwarf2_objfile_data_key): New.
(struct dwarf2_per_objfile, dwarf2_per_objfile): New.
(dwarf_info_size, dwarf_abbrev_size, dwarf_line_size)
(dwarf_pubnames_size, dwarf_aranges_size, dwarf_loc_size)
(dwarf_macinfo_size, dwarf_str_size, dwarf_ranges_size)
(dwarf_frame_size, dwarf_eh_frame_size, dwarf_info_buffer)
(dwarf_abbrev_buffer, dwarf_line_buffer, dwarf_str_buffer)
(dwarf_macinfo_buffer, dwarf_ranges_buffer, dwarf_loc_buffer):
Remove variables.
(struct dwarf2_pinfo): Remove per-objfile members. Update comments.
(DWARF_ABBREV_SIZE, DWARF_LINE_SIZE)
(DWARF_LOC_SIZE, DWARF_MACINFO_SIZE, DWARF_STR_SIZE)
(DWARF_RANGES_SIZE, DWARF_INFO_BUFFER)
(DWARF_ABBREV_BUFFER, DWARF_LINE_BUFFER, DWARF_STR_BUFFER)
(DWARF_MACINFO_BUFFER, DWARF_RANGES_BUFFER, DWARF_LOC_BUFFER):
Remove macros.
(dwarf2_has_info): Take an objfile argument. Allocate per-objfile
data.
(dwarf2_locate_sections, dwarf2_build_psymtabs)
(dwarf2_build_psymtabs_easy, dwarf2_build_psymtabs_hard)
(skip_one_die, dwarf2_get_pc_bounds, dwarf2_read_abbrevs)
(read_partial_die, read_full_die, read_indirect_string)
(dwarf_decode_line_header, dwarf_decode_macros)
(dwarf2_symbol_mark_computed): Remove use of removed macros.
Update uses of removed variables.
(psymtab_to_symtab_1): Restore per-objfile data pointer. Remove use
of removed macros.
(_initialize_dwarf2_read): New function.
* symfile.h (dwarf2_has_info): Update prototype.
* coffread.c (coff_symfile_read): Update call to dwarf2_has_info.
* elfread.c (elf_symfile_read): Likewise.
2004-04-02 19:23:05 +00:00
|
|
|
extern int dwarf2_has_info (struct objfile *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
2009-12-02 11:44:35 +00:00
|
|
|
extern void dwarf2_build_psymtabs (struct objfile *);
|
2001-12-07 12:10:15 +00:00
|
|
|
extern void dwarf2_build_frame_info (struct objfile *);
|
1999-09-09 00:02:17 +00:00
|
|
|
|
2007-10-22 01:16:34 +00:00
|
|
|
void dwarf2_free_objfile (struct objfile *);
|
|
|
|
|
1999-04-16 01:35:26 +00:00
|
|
|
/* From mdebugread.c */
|
|
|
|
|
|
|
|
/* Hack to force structures to exist before use in parameter list. */
|
|
|
|
struct ecoff_debug_hack
|
2003-06-07 23:50:23 +00:00
|
|
|
{
|
|
|
|
struct ecoff_debug_swap *a;
|
|
|
|
struct ecoff_debug_info *b;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern void mdebug_build_psymtabs (struct objfile *,
|
|
|
|
const struct ecoff_debug_swap *,
|
|
|
|
struct ecoff_debug_info *);
|
|
|
|
|
|
|
|
extern void elfmdebug_build_psymtabs (struct objfile *,
|
|
|
|
const struct ecoff_debug_swap *,
|
|
|
|
asection *);
|
1999-04-16 01:35:26 +00:00
|
|
|
|
1999-07-07 20:19:36 +00:00
|
|
|
#endif /* !defined(SYMFILE_H) */
|