aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-12-12 17:03:03 +0000
committerTom Tromey <tromey@redhat.com>2012-12-12 17:03:03 +0000
commit5c80ed9d1edd660e2e5d44d3c386d501c71404a6 (patch)
tree2d5736eddd87f98eacda7bc5b4e50d5f8c52d99a /gdb/dwarf2read.c
parent9a27f2c60d760a95a27e336750f26f69f91dd156 (diff)
downloadgdb-5c80ed9d1edd660e2e5d44d3c386d501c71404a6.zip
gdb-5c80ed9d1edd660e2e5d44d3c386d501c71404a6.tar.gz
gdb-5c80ed9d1edd660e2e5d44d3c386d501c71404a6.tar.bz2
* dbxread.c (read_dbx_symtab): Update.
(end_psymtab, dbx_psymtab_to_symtab_1, dbx_psymtab_to_symtab) (read_ofile_symtab): Add 'objfile' argument. * dwarf2read.c (process_psymtab_comp_unit_reader) (build_type_psymtabs_reader): Update. (dwarf2_psymtab_to_symtab): Add 'objfile' argument. * mdebugread.c (mdebug_psymtab_to_symtab): Add 'objfile' argument. (parse_procedure, parse_partial_symbols): Update. (psymtab_to_symtab_1): Add 'objfile' argument. * psympriv.h (struct partial_symtab) <objfile>: Remove. <read_symtab>: Add 'objfile' argument. (sort_pst_symbols, discard_psymtab): Update. * psymtab.c (partial_map_expand_apply): Update. (find_pc_sect_psymtab_closer): Add 'objfile' argument. (find_pc_sect_psymtab, find_pc_sect_symtab_from_partial): Update. (find_pc_sect_psymbol): Add 'objfile' argument. (lookup_symbol_aux_psymtabs): Update. (match_partial_symbol, lookup_partial_symbol, psymtab_to_symtab): Add 'objfile' argument. (find_last_source_symtab_from_partial, dump_psymtab) (dump_psymtabs_for_objfile, read_symtabs_for_function) (expand_partial_symbol_tables, read_psymtabs_with_filename) (find_symbol_file_from_partial, map_matching_symbols_psymtab) (expand_symtabs_matching_via_partial): Update. (sort_pst_symbols): Add 'objfile' argument. (allocate_psymtab): Update. (discard_psymtab): Add 'objfile' argument. (maintenance_info_psymtabs, maintenance_check_symtabs): Update. * stabsread.h (end_psymtab): Update. * xcoffread.c (this_symtab_objfile): New global. (process_linenos, enter_line_range, xcoff_next_symbol_text): Update. (read_xcoff_symtab): Add 'objfile' argument. (read_symbol, read_symbol_lineno): Update. (xcoff_psymtab_to_symtab_1, xcoff_psymtab_to_symtab) (xcoff_end_psymtab): Add 'objfile' argument. (scan_xcoff_symtab): Update.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index e469959..110ade9 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1284,7 +1284,8 @@ static void add_partial_subprogram (struct partial_die_info *pdi,
CORE_ADDR *lowpc, CORE_ADDR *highpc,
int need_pc, struct dwarf2_cu *cu);
-static void dwarf2_psymtab_to_symtab (struct partial_symtab *);
+static void dwarf2_psymtab_to_symtab (struct objfile *,
+ struct partial_symtab *);
static void psymtab_to_symtab_1 (struct partial_symtab *);
@@ -4896,7 +4897,7 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
(objfile->global_psymbols.list + pst->globals_offset);
pst->n_static_syms = objfile->static_psymbols.next -
(objfile->static_psymbols.list + pst->statics_offset);
- sort_pst_symbols (pst);
+ sort_pst_symbols (objfile, pst);
if (!VEC_empty (dwarf2_per_cu_ptr, cu->per_cu->s.imported_symtabs))
{
@@ -5324,7 +5325,7 @@ build_type_psymtabs_reader (const struct die_reader_specs *reader,
(objfile->global_psymbols.list + pst->globals_offset);
pst->n_static_syms = objfile->static_psymbols.next -
(objfile->static_psymbols.list + pst->statics_offset);
- sort_pst_symbols (pst);
+ sort_pst_symbols (objfile, pst);
}
/* Traversal function for build_type_psymtabs. */
@@ -6325,7 +6326,7 @@ locate_pdi_sibling (const struct die_reader_specs *reader,
/* Expand this partial symbol table into a full symbol table. */
static void
-dwarf2_psymtab_to_symtab (struct partial_symtab *pst)
+dwarf2_psymtab_to_symtab (struct objfile *objfile, struct partial_symtab *pst)
{
if (pst != NULL)
{
@@ -6344,17 +6345,16 @@ dwarf2_psymtab_to_symtab (struct partial_symtab *pst)
}
/* Restore our global data. */
- dwarf2_per_objfile = objfile_data (pst->objfile,
- dwarf2_objfile_data_key);
+ dwarf2_per_objfile = objfile_data (objfile, dwarf2_objfile_data_key);
/* If this psymtab is constructed from a debug-only objfile, the
has_section_at_zero flag will not necessarily be correct. We
can get the correct value for this flag by looking at the data
associated with the (presumably stripped) associated objfile. */
- if (pst->objfile->separate_debug_objfile_backlink)
+ if (objfile->separate_debug_objfile_backlink)
{
struct dwarf2_per_objfile *dpo_backlink
- = objfile_data (pst->objfile->separate_debug_objfile_backlink,
+ = objfile_data (objfile->separate_debug_objfile_backlink,
dwarf2_objfile_data_key);
dwarf2_per_objfile->has_section_at_zero