Relocate block range start and end addresses

gdb/ChangeLog:

	* objfiles.c (objfile_relocate1): Relocate start and end addresses
	for each range in a block.
This commit is contained in:
Kevin Buettner
2018-08-23 16:00:50 -07:00
parent 59adbf5d03
commit 9644dc3a47
2 changed files with 16 additions and 0 deletions

View File

@ -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)