diff options
author | Daniel Jacobowitz <drow@false.org> | 2008-05-03 18:04:02 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2008-05-03 18:04:02 +0000 |
commit | 30510692eb858ac9c7262a187d78337a7503d196 (patch) | |
tree | 759693eef9f1f7ae548dc42d4835b6b914d4669a /gdb/objfiles.c | |
parent | 7284e1bed8f26d644523bcf82dbfc03ff594ff36 (diff) | |
download | gdb-30510692eb858ac9c7262a187d78337a7503d196.zip gdb-30510692eb858ac9c7262a187d78337a7503d196.tar.gz gdb-30510692eb858ac9c7262a187d78337a7503d196.tar.bz2 |
* Makefile.in (objfiles.o): Update.
* exec.c (exec_set_section_address): Support p->addr != 0.
* objfiles.c (objfile_relocate): Update exec_ops section
addresses.
* symfile.c (place_section): Move exec_set_section_address call...
(default_symfile_offsets): ...to here.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 38768cc..2b30b6c 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -49,6 +49,7 @@ #include "source.h" #include "addrmap.h" #include "arch-utils.h" +#include "exec.h" /* Prototypes for local functions */ @@ -532,6 +533,7 @@ free_all_objfiles (void) void objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets) { + struct obj_section *s; struct section_offsets *delta = ((struct section_offsets *) alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections))); @@ -683,6 +685,15 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets) } } + /* Update the table in exec_ops, used to read memory. */ + ALL_OBJFILE_OSECTIONS (objfile, s) + { + int idx = s->the_bfd_section->index; + + exec_set_section_address (bfd_get_filename (objfile->obfd), idx, + s->addr); + } + /* Relocate breakpoints as necessary, after things are relocated. */ breakpoint_re_set (); } |