diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-03-28 18:17:17 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-04-04 12:58:07 -0400 |
commit | 59dfe8ad84c6a9ef17a1ba4a8f443ac3cb9f6fd5 (patch) | |
tree | 119727391fc7c5e95ace6211cac153fcbfb93876 /gdb/dwarf2 | |
parent | 056b6f879d0b958d470b9ed1df19ec68daf77467 (diff) | |
download | gdb-59dfe8ad84c6a9ef17a1ba4a8f443ac3cb9f6fd5.zip gdb-59dfe8ad84c6a9ef17a1ba4a8f443ac3cb9f6fd5.tar.gz gdb-59dfe8ad84c6a9ef17a1ba4a8f443ac3cb9f6fd5.tar.bz2 |
gdb: rename start_symtab/end_symtab to start_compunit_symtab/end_compunit_symtab
It's a bit confusing because we have both "compunit_symtab" and "symtab"
types, and many methods and functions containing "start_symtab" or
"end_symtab", which actually deal with compunit_symtabs. I believe this
comes from the time before compunit_symtab was introduced, where
symtab did the job of both.
Rename everything I found containing start_symtab or end_symtab to use
start_compunit_symtab or end_compunit_symtab.
Change-Id: If3849b156f6433640173085ad479b6a0b085ade2
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r-- | gdb/dwarf2/cu.c | 4 | ||||
-rw-r--r-- | gdb/dwarf2/cu.h | 10 | ||||
-rw-r--r-- | gdb/dwarf2/read.c | 15 |
3 files changed, 15 insertions, 14 deletions
diff --git a/gdb/dwarf2/cu.c b/gdb/dwarf2/cu.c index b1fd688..d70eb0e 100644 --- a/gdb/dwarf2/cu.c +++ b/gdb/dwarf2/cu.c @@ -54,8 +54,8 @@ dwarf2_cu::addr_sized_int_type (bool unsigned_p) const buildsym_compunit constructor. */ struct compunit_symtab * -dwarf2_cu::start_symtab (const char *name, const char *comp_dir, - CORE_ADDR low_pc) +dwarf2_cu::start_compunit_symtab (const char *name, const char *comp_dir, + CORE_ADDR low_pc) { gdb_assert (m_builder == nullptr); diff --git a/gdb/dwarf2/cu.h b/gdb/dwarf2/cu.h index bce0a3d..6b72ec2 100644 --- a/gdb/dwarf2/cu.h +++ b/gdb/dwarf2/cu.h @@ -59,11 +59,11 @@ struct dwarf2_cu We don't need the pc/line-number mapping for type units. */ void setup_type_unit_groups (struct die_info *die); - /* Start a symtab for DWARF. NAME, COMP_DIR, LOW_PC are passed to the - buildsym_compunit constructor. */ - struct compunit_symtab *start_symtab (const char *name, - const char *comp_dir, - CORE_ADDR low_pc); + /* Start a compunit_symtab for DWARF. NAME, COMP_DIR, LOW_PC are passed to + the buildsym_compunit constructor. */ + struct compunit_symtab *start_compunit_symtab (const char *name, + const char *comp_dir, + CORE_ADDR low_pc); /* Reset the builder. */ void reset_builder () { m_builder.reset (); } diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 68c73c6..cb33171 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -9458,7 +9458,8 @@ process_full_comp_unit (dwarf2_cu *cu, enum language pretend_language) get_scope_pc_bounds (cu->dies, &lowpc, &highpc, cu); addr = gdbarch_adjust_dwarf2_addr (gdbarch, highpc + baseaddr); - static_block = cu->get_builder ()->end_symtab_get_static_block (addr, 0, 1); + static_block + = cu->get_builder ()->end_compunit_symtab_get_static_block (addr, 0, 1); /* If the comp unit has DW_AT_ranges, it may have discontiguous ranges. Also, DW_AT_ranges may record ranges not belonging to any child DIEs @@ -9467,9 +9468,8 @@ process_full_comp_unit (dwarf2_cu *cu, enum language pretend_language) this comp unit. */ dwarf2_record_block_ranges (cu->dies, static_block, baseaddr, cu); - cust = cu->get_builder ()->end_symtab_from_static_block (static_block, - SECT_OFF_TEXT (objfile), - 0); + cust = cu->get_builder ()->end_compunit_symtab_from_static_block + (static_block, SECT_OFF_TEXT (objfile), 0); if (cust != NULL) { @@ -10626,7 +10626,8 @@ read_file_scope (struct die_info *die, struct dwarf2_cu *cu) file_and_directory &fnd = find_file_and_directory (die, cu); - cu->start_symtab (fnd.get_name (), fnd.intern_comp_dir (objfile), lowpc); + cu->start_compunit_symtab (fnd.get_name (), fnd.intern_comp_dir (objfile), + lowpc); gdb_assert (per_objfile->sym_cu == nullptr); scoped_restore restore_sym_cu @@ -10719,7 +10720,7 @@ dwarf2_cu::setup_type_unit_groups (struct die_info *die) if (lh == NULL) { if (first_time) - start_symtab ("", NULL, 0); + start_compunit_symtab ("", NULL, 0); else { gdb_assert (tug_unshare->symtabs == NULL); @@ -10740,7 +10741,7 @@ dwarf2_cu::setup_type_unit_groups (struct die_info *die) if (first_time) { - struct compunit_symtab *cust = start_symtab ("", NULL, 0); + struct compunit_symtab *cust = start_compunit_symtab ("", NULL, 0); /* Note: We don't assign tu_group->compunit_symtab yet because we're still initializing it, and our caller (a few levels up) |