This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Do not read from the executable if ptrace fails
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: brobecker at adacore dot com (Joel Brobecker), gdb-patches at sourceware dot org, alex00882007 at gmail dot com (Alex)
- Date: Mon, 23 Jul 2007 21:02:33 +0200 (CEST)
- Subject: Re: [rfc] Do not read from the executable if ptrace fails
Dan Jacobowitz wrote:
> On Mon, Jun 25, 2007 at 07:54:03PM -0400, Joel Brobecker wrote:
> > > Any comments, or shall I apply this?
> > >
> > > --
> > > Daniel Jacobowitz
> > > CodeSourcery
> > >
> > > 2007-06-24 Daniel Jacobowitz <dan@codesourcery.com>
> > >
> > > PR symtab/2161
> > > * target.c (memory_xfer_partial): Do not continue past targets with
> > > all memory.
> >
> > FWIW, it looks pretty good to me, and I think it should be part of 6.7
> > too.
>
> OK, I checked it in.
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?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com