From: Ulrich Weigand Date: Tue, 24 Jul 2007 12:49:24 +0000 (+0000) Subject: * target.c (memory_xfer_partial): Accesses to unmapped overlay X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=98646950ba7fc48d4dc57b3d55be70fdbffee4ab;p=binutils-gdb.git * target.c (memory_xfer_partial): Accesses to unmapped overlay sections should always go to the executable file. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 60f4e9af767..5165e0b091a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2007-07-24 Ulrich Weigand + + * target.c (memory_xfer_partial): Accesses to unmapped overlay + sections should always go to the executable file. + 2004-07-20 Chris Dearman * mips-tdep.c (heuristic_proc_start): Add more MIPS16 function diff --git a/gdb/target.c b/gdb/target.c index 2bb50e6f6b8..92a4d6ac2c9 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. */