This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Do not call read_pc in startup_inferior
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 28 Apr 2009 15:28:26 -0400
- Subject: Re: [rfc] Do not call read_pc in startup_inferior
- References: <200904281637.n3SGbClg009383@d12av02.megacenter.de.ibm.com>
On Tue, Apr 28, 2009 at 06:37:12PM +0200, Ulrich Weigand wrote:
> Hello,
>
> a while ago, I committed a patch to avoid calling wait_for_inferior
> in startup_inferior, so as to avoid accessing inferior register state
> at a time where the target's actual register layout has not yet been
> determined (via target_find_description).
>
> However, startup_inferior still contains a read_pc call to retrieve
> the initial value of stop_pc -- this of course runs into the same
> problem.
>
> The patch below removes the read_pc call from startup_inferior, and
> instead determines the initial stop_pc value in post_create_inferior,
> after the register layout has been finalized.
You're moving the call from a native "run" only routine, to an
all-targets routine. That made me curious so I went looking... what
relies on this setting? Anything?
--
Daniel Jacobowitz
CodeSourcery