gdb: remove BLOCK_RANGES macro

Replace with an equivalent method on struct block.

Change-Id: I6dcf13e9464ba8a08ade85c89e7329c300fd6c2a
This commit is contained in:
Simon Marchi
2022-02-06 22:27:53 -05:00
committed by Simon Marchi
parent 6dd5a4bd44
commit f5cb8afdd2
3 changed files with 24 additions and 17 deletions

View File

@@ -680,13 +680,11 @@ objfile_relocate1 (struct objfile *objfile,
b->set_start (b->start () + delta[block_line_section]);
b->set_end (b->end () + delta[block_line_section]);
if (BLOCK_RANGES (b) != nullptr)
for (int j = 0; j < BLOCK_NRANGES (b); j++)
{
blockrange &r = BLOCK_RANGE (b)[j];
r.set_start (r.start () + delta[block_line_section]);
r.set_end (r.end () + delta[block_line_section]);
}
for (blockrange &r : b->ranges ())
{
r.set_start (r.start () + delta[block_line_section]);
r.set_end (r.end () + delta[block_line_section]);
}
/* We only want to iterate over the local symbols, not any
symbols in included symtabs. */