aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-04-19 13:21:51 -0600
committerTom Tromey <tromey@adacore.com>2023-06-05 09:59:17 -0600
commit611e7b5cb92dfe0a81543d1581442780f2b8c4de (patch)
tree0f8442e6997e7967327f5e69ae4953287af603f1
parent3f60b98298fd77dec3a9182797c9dd6d7796bcaf (diff)
downloadgdb-611e7b5cb92dfe0a81543d1581442780f2b8c4de.zip
gdb-611e7b5cb92dfe0a81543d1581442780f2b8c4de.tar.gz
gdb-611e7b5cb92dfe0a81543d1581442780f2b8c4de.tar.bz2
Remove baseaddr parameter from dwarf2_record_block_ranges
dwarf2_record_block_ranges is only ever called with the text section offset, so this patch removes the parameter entirely. This makes a subsequent patch a little simpler.
-rw-r--r--gdb/dwarf2/read.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 8c032f6..27bf66d 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -906,7 +906,7 @@ static void get_scope_pc_bounds (struct die_info *,
struct dwarf2_cu *);
static void dwarf2_record_block_ranges (struct die_info *, struct block *,
- CORE_ADDR, struct dwarf2_cu *);
+ struct dwarf2_cu *);
static void dwarf2_add_field (struct field_info *, struct die_info *,
struct dwarf2_cu *);
@@ -6428,7 +6428,7 @@ process_full_comp_unit (dwarf2_cu *cu, enum language pretend_language)
(such as virtual method tables). Record the ranges in STATIC_BLOCK's
addrmap to help ensure it has an accurate map of pc values belonging to
this comp unit. */
- dwarf2_record_block_ranges (cu->dies, static_block, baseaddr, cu);
+ dwarf2_record_block_ranges (cu->dies, static_block, cu);
cust = cu->get_builder ()->end_compunit_symtab_from_static_block
(static_block, 0);
@@ -10226,7 +10226,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
&objfile->objfile_obstack);
/* If we have address ranges, record them. */
- dwarf2_record_block_ranges (die, block, baseaddr, cu);
+ dwarf2_record_block_ranges (die, block, cu);
gdbarch_make_symbol_special (gdbarch, cstk.name, objfile);
@@ -10339,7 +10339,7 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
there. But since we don't even decide whether to create a
block until after we've traversed its children, that's hard
to do. */
- dwarf2_record_block_ranges (die, block, baseaddr, cu);
+ dwarf2_record_block_ranges (die, block, cu);
}
*cu->get_builder ()->get_local_symbols () = cstk.locals;
cu->get_builder ()->set_local_using_directives (cstk.local_using_directives);
@@ -11316,9 +11316,10 @@ get_scope_pc_bounds (struct die_info *die,
static void
dwarf2_record_block_ranges (struct die_info *die, struct block *block,
- CORE_ADDR baseaddr, struct dwarf2_cu *cu)
+ struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->per_objfile->objfile;
+ CORE_ADDR baseaddr = objfile->text_section_offset ();
struct gdbarch *gdbarch = objfile->arch ();
struct attribute *attr;
struct attribute *attr_high;