[rfc] Do not read from the executable if ptrace fails
Daniel Jacobowitz
drow@false.org
Mon Jul 23 21:25:00 GMT 2007
On Mon, Jul 23, 2007 at 09:02:33PM +0200, Ulrich Weigand wrote:
> I only noticed now, but this breaks SPU overlay support.
:-(
> Overlay support uses "LMA" addresses to refer to overlay sections
> not currently loaded, and performs xfer_partial requests to read
> from those (e.g. when invoking skip_prologue on a function not
> currently present).
>
> This works only if accesses to those LMA addresses go through to
> the xfer_memory routine in exec.c, which implements the required
> logic to retrieve those section contents from the executable file.
>
> This used to work (probably accidentally?), but is broken by
> this patch. Any suggestions how to fix it? Should the overlay
> logic from xfer_memory be moved to memory_xfer_partial, maybe?
That sounds reasonable. What about if we check for an unmapped
overlay address at the same point we handle trust_readonly?
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb-patches
mailing list