aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-07-24 12:49:24 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-07-24 12:49:24 +0000
commit98646950ba7fc48d4dc57b3d55be70fdbffee4ab (patch)
treef967655f8a6d73f24690339d198b8a6c144dabf5 /gdb/target.c
parent94226e8246cb57e870901213972fb2b32c2afe3f (diff)
downloadgdb-98646950ba7fc48d4dc57b3d55be70fdbffee4ab.zip
gdb-98646950ba7fc48d4dc57b3d55be70fdbffee4ab.tar.gz
gdb-98646950ba7fc48d4dc57b3d55be70fdbffee4ab.tar.bz2
* target.c (memory_xfer_partial): Accesses to unmapped overlay
sections should always go to the executable file.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/target.c b/gdb/target.c
index 2bb50e6..92a4d6a 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1017,6 +1017,14 @@ memory_xfer_partial (struct target_ops *ops, void *readbuf, const void *writebuf
return xfer_memory (memaddr, readbuf, len, 0, NULL, ops);
}
+ /* Likewise for accesses to unmapped overlay sections. */
+ if (readbuf != NULL && overlay_debugging)
+ {
+ asection *section = find_pc_overlay (memaddr);
+ if (pc_in_unmapped_range (memaddr, section))
+ return xfer_memory (memaddr, readbuf, len, 0, NULL, ops);
+ }
+
/* Try GDB's internal data cache. */
region = lookup_mem_region (memaddr);
/* region->hi == 0 means there's no upper bound. */