summaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index a919442632c..ebd534c36c4 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -674,12 +674,19 @@ exec_set_section_address (const char *filename, int index, CORE_ADDR address)
for (p = exec_ops.to_sections; p < exec_ops.to_sections_end; p++)
{
+ /* FIXME drow/2006-06-01: This used to say "&& p->addr == 0".
+ But that messes up multiple qOffsets responses relocating an
+ executable; the previous relocated value doesn't matter.
+ Removing it makes qOffsets attempt to override "set section".
+ There should be a user-specified flag - or else we should
+ just use the objfile's sections, or something like that.
+
+ This deserves more thought before a merge to mainline. */
if (strcmp (filename, p->bfd->filename) == 0
- && index == p->the_bfd_section->index
- && p->addr == 0)
+ && index == p->the_bfd_section->index)
{
+ p->endaddr += address - p->addr;
p->addr = address;
- p->endaddr += address;
}
}
}