aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2018-08-23 16:00:50 -0700
committerKevin Buettner <kevinb@redhat.com>2018-08-23 16:23:06 -0700
commit9644dc3a478d9ae85f1ca327ab3fa5ac0ce9fe64 (patch)
tree2a6dc0955eb5f97258bb396645b99f200be32c09 /gdb/objfiles.c
parent59adbf5d03f5d9380f9870e22262c59f5f9beec8 (diff)
downloadgdb-9644dc3a478d9ae85f1ca327ab3fa5ac0ce9fe64.zip
gdb-9644dc3a478d9ae85f1ca327ab3fa5ac0ce9fe64.tar.gz
gdb-9644dc3a478d9ae85f1ca327ab3fa5ac0ce9fe64.tar.bz2
Relocate block range start and end addresses
gdb/ChangeLog: * objfiles.c (objfile_relocate1): Relocate start and end addresses for each range in a block.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index df28da5..4bffd20 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -831,6 +831,14 @@ objfile_relocate1 (struct objfile *objfile,
BLOCK_START (b) += ANOFFSET (delta, block_line_section);
BLOCK_END (b) += ANOFFSET (delta, block_line_section);
+ if (BLOCK_RANGES (b) != nullptr)
+ for (int j = 0; j < BLOCK_NRANGES (b); j++)
+ {
+ BLOCK_RANGE_START (b, j)
+ += ANOFFSET (delta, block_line_section);
+ BLOCK_RANGE_END (b, j) += ANOFFSET (delta, block_line_section);
+ }
+
/* We only want to iterate over the local symbols, not any
symbols in included symtabs. */
ALL_DICT_SYMBOLS (BLOCK_DICT (b), iter, sym)