summaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-02-06 22:27:53 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-04-27 22:05:03 -0400
commitf5cb8afdd297dd68273d98a10fbfd350dff918d8 (patch)
treec3b83ac2d128cf099e3e171c14df5ab78608616b /gdb/objfiles.c
parent6dd5a4bd44b7b7d2daf195dd5e48faeaf7231c17 (diff)
downloadbinutils-gdb-f5cb8afdd297dd68273d98a10fbfd350dff918d8.tar.gz
gdb: remove BLOCK_RANGES macro
Replace with an equivalent method on struct block. Change-Id: I6dcf13e9464ba8a08ade85c89e7329c300fd6c2a
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 9c7a30d9a60..c4b054a70d5 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -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. */