From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15073 invoked by alias); 28 Dec 2011 13:10:39 -0000 Received: (qmail 14614 invoked by uid 22791); 28 Dec 2011 13:10:38 -0000 X-SWARE-Spam-Status: No, hits=-7.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Dec 2011 13:10:26 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBSDA40v032291 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Dec 2011 08:10:04 -0500 Received: from host2.jankratochvil.net (ovpn-116-32.ams2.redhat.com [10.36.116.32]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pBSDA0do022924 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 28 Dec 2011 08:10:03 -0500 Date: Wed, 28 Dec 2011 15:16:00 -0000 From: Jan Kratochvil To: Paul Hilfinger Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Have block_innermost_frame start from selected frame Message-ID: <20111228130959.GA2885@host2.jankratochvil.net> References: <20111227195809.672D892BF6@kwai.gnat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111227195809.672D892BF6@kwai.gnat.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-12/txt/msg00868.txt.bz2 On Tue, 27 Dec 2011 20:58:09 +0100, Paul Hilfinger wrote: > --- a/gdb/blockframe.c > +++ b/gdb/blockframe.c > @@ -370,7 +370,9 @@ block_innermost_frame (const struct block *block) > start = BLOCK_START (block); > end = BLOCK_END (block); > > - frame = get_current_frame (); > + frame = get_selected_frame_if_set (); > + if (frame == NULL) > + frame = get_current_frame (); And the comment of this function is no longer valid then: /* Return the innermost stack frame executing inside of BLOCK, or NULL if there is no such frame. If BLOCK is NULL, just return NULL. */ struct frame_info * block_innermost_frame (const struct block *block) Regards, Jan