aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-02-06 22:54:03 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-04-27 22:05:03 -0400
commit63d609debba854d08a515f73d0ad8e4ef8948370 (patch)
treec5e6b2c9d4b48350c707316a48e69388524cdf66 /gdb/objfiles.c
parent6395b62847e581acc3e8fa179444b824d17b3d68 (diff)
downloadgdb-63d609debba854d08a515f73d0ad8e4ef8948370.zip
gdb-63d609debba854d08a515f73d0ad8e4ef8948370.tar.gz
gdb-63d609debba854d08a515f73d0ad8e4ef8948370.tar.bz2
gdb: remove BLOCKVECTOR_BLOCK and BLOCKVECTOR_NBLOCKS macros
Replace with calls to blockvector::blocks, and the appropriate method call on the returned array_view. Change-Id: I04d1f39603e4d4c21c96822421431d9a029d8ddd
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index c4b054a..0fec523 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -664,19 +664,17 @@ objfile_relocate1 (struct objfile *objfile,
for (compunit_symtab *cust : objfile->compunits ())
{
- const struct blockvector *bv = cust->blockvector ();
+ struct blockvector *bv = cust->blockvector ();
int block_line_section = cust->block_line_section ();
if (BLOCKVECTOR_MAP (bv))
addrmap_relocate (BLOCKVECTOR_MAP (bv), delta[block_line_section]);
- for (int i = 0; i < BLOCKVECTOR_NBLOCKS (bv); ++i)
+ for (block *b : bv->blocks ())
{
- struct block *b;
struct symbol *sym;
struct mdict_iterator miter;
- b = BLOCKVECTOR_BLOCK (bv, i);
b->set_start (b->start () + delta[block_line_section]);
b->set_end (b->end () + delta[block_line_section]);