From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23459 invoked by alias); 24 Oct 2014 15:47:28 -0000 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 Received: (qmail 23449 invoked by uid 89); 24 Oct 2014 15:47:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f42.google.com Received: from mail-qa0-f42.google.com (HELO mail-qa0-f42.google.com) (209.85.216.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 24 Oct 2014 15:47:26 +0000 Received: by mail-qa0-f42.google.com with SMTP id cs9so1128687qab.15 for ; Fri, 24 Oct 2014 08:47:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=aqr/wgQF8+IeB7VFvnl+RX62BOcbkZ4gFRg2Xt4Rs9Y=; b=h6BtVus2reYvyQ08sPV0PLrnGQnTf30eqzIS1Y4WH+RL77wPqpiwjb0O/oMgkF1TdH QDLtCypUNrayDodRoLqbkgVsuuQXl7qf7PAp1PxHQXWlw7SHR4q7hD14NtvxRG94cBCC i2FVoLA9ADESjaencpkVYDCrYNEjfc/1hrppBuuxb8sHQYSKSHPlDckCQ6xwyTnWFKdM f2Q0ndbz1Kp/w78GXiCD0S1pq9eFo1fSenyXNFDO1Q+nagnIXxR7L0Z1+YHrQTxHiVr7 DEKKldHZEa2vSeYHve5gA8/wibc1XgXRALa06TqOR/w5z2o653ZXUeCqbzgkqQuUWfaH 0tuQ== X-Gm-Message-State: ALoCoQm6srcNZ4o7CsQxKNT2jliHq1KeAcTY11LpKs3rtBrO9A/yFoPCmTmLcUwY62HR2qtVYp6Q MIME-Version: 1.0 X-Received: by 10.140.80.165 with SMTP id c34mr7007154qgd.96.1414165644424; Fri, 24 Oct 2014 08:47:24 -0700 (PDT) Received: by 10.229.250.4 with HTTP; Fri, 24 Oct 2014 08:47:24 -0700 (PDT) In-Reply-To: <201410241534.s9OFYB0N021380@d06av02.portsmouth.uk.ibm.com> References: <544A6A06.3030409@redhat.com> <201410241534.s9OFYB0N021380@d06av02.portsmouth.uk.ibm.com> Date: Fri, 24 Oct 2014 15:47:00 -0000 Message-ID: Subject: Re: [PATCH] Python API: Add gdb.is_in_prologue and gdb.is_in_epilogue. From: Doug Evans To: Ulrich Weigand Cc: Pedro Alves , Martin Galvan , gdb-patches , Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00651.txt.bz2 On Fri, Oct 24, 2014 at 8:34 AM, Ulrich Weigand wrote: > Pedro Alves wrote: >> On 10/24/2014 05:57 AM, Doug Evans wrote: >> > If one went that route then I wonder whether we need two API functions. >> > [If we did go with only one function I'd choose a different name than >> > foo_destroyed of course.] >> >> Do you have a better suggestion for the gdbarch hook? I think we >> should just rename it for good, avoiding these confusions further. > > So if the only use of this interface is to check whether the result of > some other interface (I assume something like Frame.read_var ?) is > reliable, then I guess we might consider moving the check actually > into that other interface. E.g. have Frame.read_var itself check > in_epilogue and return an unavailable or optimized-out value if > the value would be unreliable otherwise. I can imagine someone wanting to do the check before doing gdb.parse_and_eval (an escape hatch for general expression evaluation). Also, FAOD, the API function in question still should check whether the pc is in the prologue (unless, e.g., gdb knows the debug info is usable) as there too locals may not be accessible.