]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Relocate block range start and end addresses
authorKevin Buettner <kevinb@redhat.com>
Thu, 23 Aug 2018 23:00:50 +0000 (16:00 -0700)
committerKevin Buettner <kevinb@redhat.com>
Thu, 23 Aug 2018 23:23:06 +0000 (16:23 -0700)
gdb/ChangeLog:

* objfiles.c (objfile_relocate1): Relocate start and end addresses
for each range in a block.

gdb/ChangeLog
gdb/objfiles.c

index 319c19685b0639228c32cfa497ff452000e1feba..9da11258001d08d8cc9bc2784f4d53cb50e6eb8d 100644 (file)
        * tracepoint.c (info_scope_command): Likewise.
        * value.c (value_fn_field): Likewise.
 
+       * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
+       in place of find_pc_partial_function.
+       * blockframe.c (find_function_entry_range_from_pc): New function.
+       * symtab.h (find_function_entry_range_from_pc): Declare and document.
+       * objfiles.c (objfile_relocate1): Relocate start and end addresses
+       for each range in a block.
+
+
 2018-08-23  Xavier Roirand  <roirand@adacore.com>
 
        * machoread.c (macho_symfile_read_all_oso): Remove uneeded
index df28da59cb0a59e0872b710b5d9d087f4675954f..4bffd2048c3117b654d4207fa192fd16c74361ed 100644 (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)