summaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-01-19 06:14:49 -0700
committerTom Tromey <tromey@adacore.com>2023-02-08 08:20:12 -0700
commitd401e7bf04c0949dcc5e3d83143b75efc19d5f1e (patch)
tree12aa55e8db5685c3dbe19b166db11a19c9e51a56 /gdb/objfiles.c
parent83bad3162d7303b51e2ec9b49cb9e78c72d27aa3 (diff)
downloadbinutils-gdb-d401e7bf04c0949dcc5e3d83143b75efc19d5f1e.tar.gz
Remove compunit_symtab::m_block_line_section
The previous patch hard-coded SECT_OFF_TEXT into the buildsym code. After this, it's clear that there is only one caller of compunit_symtab::set_block_line_section, and it always passes SECT_OFF_TEXT. So, remove compunit_symtab::m_block_line_section and use SECT_OFF_TEXT instead.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index e4fe3562c12..bf5057e723d 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -629,7 +629,7 @@ objfile_relocate1 (struct objfile *objfile,
if (l)
{
for (int i = 0; i < l->nitems; ++i)
- l->item[i].pc += delta[cust->block_line_section ()];
+ l->item[i].pc += delta[SECT_OFF_TEXT (objfile)];
}
}
}
@@ -637,7 +637,7 @@ objfile_relocate1 (struct objfile *objfile,
for (compunit_symtab *cust : objfile->compunits ())
{
struct blockvector *bv = cust->blockvector ();
- int block_line_section = cust->block_line_section ();
+ int block_line_section = SECT_OFF_TEXT (objfile);
if (bv->map () != nullptr)
bv->map ()->relocate (delta[block_line_section]);