This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Displaced stepping with wrong entry point address
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: gdb-patches at sourceware dot org, pedro at codesourcery dot com
- Date: Thu, 4 Sep 2008 21:28:06 +0200 (CEST)
- Subject: Re: [rfc] Displaced stepping with wrong entry point address
Daniel Jacobowitz wrote:
> On Fri, Aug 22, 2008 at 07:48:46PM +0200, Ulrich Weigand wrote:
> > I'm wondering whether this fix would be good for the general case too
> > -- there may be situations where entry_point_address does not work
> > (e.g. because the main executable file could not be loaded). The
> > auxiliary vector, on targets where it is present, will probably be
> > more reliable ...
>
> We really ought to cache this value; you'll go back and forth to the
> target to read the auxv vector at every singlestep.
Good point. I guess the cache would need to be reset from within a
inferior_created observer? I'll give it a try ...
> If SPU ever did support displaced stepping (not that this would be
> terribly useful, but consider some other multi-architecture case),
> would this be wrong for the SPU side code?
Yes, of course -- we have different address spaces here, and we need
to find a location within the address space of the current thread where
to place the displaced instruction. No single address would work for
both PowerPC and SPU code in a combined application.
But I guess SPU could always install its own callback to handle those
special cases ... (just as we install the ON_STACK dummy call location
method because the AT_ENTRY method doesn't work for combined applications.)
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com