aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2/read.c')
-rw-r--r--gdb/dwarf2/read.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index d583030..3ca7772 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -1204,7 +1204,8 @@ static void dwarf2_find_base_address (struct die_info *die,
struct dwarf2_cu *cu);
static dwarf2_psymtab *create_partial_symtab
- (struct dwarf2_per_cu_data *per_cu, const char *name);
+ (dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile,
+ const char *name);
static void build_type_psymtabs_reader (const struct die_reader_specs *reader,
const gdb_byte *info_ptr,
@@ -7331,7 +7332,7 @@ create_type_unit_group (struct dwarf2_cu *cu, sect_offset line_offset_struct)
else
name = string_printf ("<type_units_at_0x%x>", line_offset);
- pst = create_partial_symtab (per_cu, name.c_str ());
+ pst = create_partial_symtab (per_cu, dwarf2_per_objfile, name.c_str ());
pst->anonymous = true;
}
@@ -7405,9 +7406,11 @@ get_type_unit_group (struct dwarf2_cu *cu, const struct attribute *stmt_list)
dirname, textlow, texthigh. */
static dwarf2_psymtab *
-create_partial_symtab (struct dwarf2_per_cu_data *per_cu, const char *name)
+create_partial_symtab (dwarf2_per_cu_data *per_cu,
+ dwarf2_per_objfile *per_objfile,
+ const char *name)
{
- struct objfile *objfile = per_cu->dwarf2_per_objfile->objfile;
+ struct objfile *objfile = per_objfile->objfile;
dwarf2_psymtab *pst;
pst = new dwarf2_psymtab (name, objfile, per_cu);
@@ -7429,7 +7432,8 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
enum language pretend_language)
{
struct dwarf2_cu *cu = reader->cu;
- struct objfile *objfile = cu->per_objfile->objfile;
+ dwarf2_per_objfile *per_objfile = cu->per_objfile;
+ struct objfile *objfile = per_objfile->objfile;
struct gdbarch *gdbarch = objfile->arch ();
struct dwarf2_per_cu_data *per_cu = cu->per_cu;
CORE_ADDR baseaddr;
@@ -7456,7 +7460,7 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
filename = debug_filename.get ();
}
- pst = create_partial_symtab (per_cu, filename);
+ pst = create_partial_symtab (per_cu, per_objfile, filename);
/* This must be done before calling dwarf2_build_include_psymtabs. */
pst->dirname = dwarf2_string_attr (comp_unit_die, DW_AT_comp_dir, cu);
@@ -7637,7 +7641,7 @@ build_type_psymtabs_reader (const struct die_reader_specs *reader,
tu_group->tus->push_back (sig_type);
prepare_one_comp_unit (cu, type_unit_die, language_minimal);
- pst = create_partial_symtab (per_cu, "");
+ pst = create_partial_symtab (per_cu, dwarf2_per_objfile, "");
pst->anonymous = true;
first_die = load_partial_dies (reader, info_ptr, 1);