From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32404 invoked by alias); 28 Apr 2009 19:28:35 -0000 Received: (qmail 32394 invoked by uid 22791); 28 Apr 2009 19:28:35 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Apr 2009 19:28:30 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id EC38310559; Tue, 28 Apr 2009 19:28:27 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id CBCB510556; Tue, 28 Apr 2009 19:28:27 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Lysyg-0008LW-Nx; Tue, 28 Apr 2009 15:28:26 -0400 Date: Tue, 28 Apr 2009 19:28:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [rfc] Do not call read_pc in startup_inferior Message-ID: <20090428192826.GA31724@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org References: <200904281637.n3SGbClg009383@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200904281637.n3SGbClg009383@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00764.txt.bz2 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