• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修订版d4ea1c4e01ffb02c4e748ec44605e99bf90fc464 (tree)
时间2020-05-13 04:24:50
作者Simon Marchi <simon.marchi@effi...>
CommiterSimon Marchi

Log Message

Add dwarf2_per_objfile parameter to create_partial_symtab

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.

更改概述

差异

--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -1204,7 +1204,8 @@ static void dwarf2_find_base_address (struct die_info *die,
12041204 struct dwarf2_cu *cu);
12051205
12061206 static dwarf2_psymtab *create_partial_symtab
1207- (struct dwarf2_per_cu_data *per_cu, const char *name);
1207+ (dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile,
1208+ const char *name);
12081209
12091210 static void build_type_psymtabs_reader (const struct die_reader_specs *reader,
12101211 const gdb_byte *info_ptr,
@@ -7293,7 +7294,7 @@ create_type_unit_group (struct dwarf2_cu *cu, sect_offset line_offset_struct)
72937294 else
72947295 name = string_printf ("<type_units_at_0x%x>", line_offset);
72957296
7296- pst = create_partial_symtab (per_cu, name.c_str ());
7297+ pst = create_partial_symtab (per_cu, dwarf2_per_objfile, name.c_str ());
72977298 pst->anonymous = true;
72987299 }
72997300
@@ -7367,9 +7368,11 @@ get_type_unit_group (struct dwarf2_cu *cu, const struct attribute *stmt_list)
73677368 dirname, textlow, texthigh. */
73687369
73697370 static dwarf2_psymtab *
7370-create_partial_symtab (struct dwarf2_per_cu_data *per_cu, const char *name)
7371+create_partial_symtab (dwarf2_per_cu_data *per_cu,
7372+ dwarf2_per_objfile *per_objfile,
7373+ const char *name)
73717374 {
7372- struct objfile *objfile = per_cu->dwarf2_per_objfile->objfile;
7375+ struct objfile *objfile = per_objfile->objfile;
73737376 dwarf2_psymtab *pst;
73747377
73757378 pst = new dwarf2_psymtab (name, objfile, per_cu);
@@ -7391,7 +7394,8 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
73917394 enum language pretend_language)
73927395 {
73937396 struct dwarf2_cu *cu = reader->cu;
7394- struct objfile *objfile = cu->per_objfile->objfile;
7397+ dwarf2_per_objfile *per_objfile = cu->per_objfile;
7398+ struct objfile *objfile = per_objfile->objfile;
73957399 struct gdbarch *gdbarch = objfile->arch ();
73967400 struct dwarf2_per_cu_data *per_cu = cu->per_cu;
73977401 CORE_ADDR baseaddr;
@@ -7418,7 +7422,7 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
74187422 filename = debug_filename.get ();
74197423 }
74207424
7421- pst = create_partial_symtab (per_cu, filename);
7425+ pst = create_partial_symtab (per_cu, per_objfile, filename);
74227426
74237427 /* This must be done before calling dwarf2_build_include_psymtabs. */
74247428 pst->dirname = dwarf2_string_attr (comp_unit_die, DW_AT_comp_dir, cu);
@@ -7599,7 +7603,7 @@ build_type_psymtabs_reader (const struct die_reader_specs *reader,
75997603 tu_group->tus->push_back (sig_type);
76007604
76017605 prepare_one_comp_unit (cu, type_unit_die, language_minimal);
7602- pst = create_partial_symtab (per_cu, "");
7606+ pst = create_partial_symtab (per_cu, dwarf2_per_objfile, "");
76037607 pst->anonymous = true;
76047608
76057609 first_die = load_partial_dies (reader, info_ptr, 1);