This allows removing a dwarf2_per_cu_data::dwarf2_per_objfile reference.
gdb/ChangeLog:
* dwarf2/read.c (create_partial_symtab): Add dwarf2_per_objfile
parameter.
(create_type_unit_group): Update.
(process_psymtab_comp_unit_reader): Update.
(build_type_psymtabs_reader): Update.
Change-Id: I72e3a8fce8022943ce6992fb623e05636cd0e3a5
+2020-05-27 Simon Marchi <simon.marchi@efficios.com>
+
+ * dwarf2/read.c (create_partial_symtab): Add dwarf2_per_objfile
+ parameter.
+ (create_type_unit_group): Update.
+ (process_psymtab_comp_unit_reader): Update.
+ (build_type_psymtabs_reader): Update.
+
2020-05-27 Simon Marchi <simon.marchi@efficios.com>
* dwarf2/read.c (cutu_reader::keep): Access dwarf2_per_objfile
2020-05-27 Simon Marchi <simon.marchi@efficios.com>
* dwarf2/read.c (cutu_reader::keep): Access dwarf2_per_objfile
struct dwarf2_cu *cu);
static dwarf2_psymtab *create_partial_symtab
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,
static void build_type_psymtabs_reader (const struct die_reader_specs *reader,
const gdb_byte *info_ptr,
else
name = string_printf ("<type_units_at_0x%x>", line_offset);
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 ());
dirname, textlow, texthigh. */
static dwarf2_psymtab *
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);
dwarf2_psymtab *pst;
pst = new dwarf2_psymtab (name, objfile, per_cu);
enum language pretend_language)
{
struct dwarf2_cu *cu = reader->cu;
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;
struct gdbarch *gdbarch = objfile->arch ();
struct dwarf2_per_cu_data *per_cu = cu->per_cu;
CORE_ADDR baseaddr;
filename = debug_filename.get ();
}
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);
/* This must be done before calling dwarf2_build_include_psymtabs. */
pst->dirname = dwarf2_string_attr (comp_unit_die, DW_AT_comp_dir, cu);
tu_group->tus->push_back (sig_type);
prepare_one_comp_unit (cu, type_unit_die, language_minimal);
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);
pst->anonymous = true;
first_die = load_partial_dies (reader, info_ptr, 1);