From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8373 invoked by alias); 29 Dec 2011 19:02:13 -0000 Received: (qmail 8360 invoked by uid 22791); 29 Dec 2011 19:02:11 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from tully.CS.Berkeley.EDU (HELO tully.CS.Berkeley.EDU) (128.32.153.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Dec 2011 19:01:59 +0000 Received: from tully.CS.Berkeley.EDU (localhost [127.0.0.1]) by tully.CS.Berkeley.EDU (8.14.4+Sun/8.14.4) with ESMTP id pBTJ1YZB028664; Thu, 29 Dec 2011 11:01:34 -0800 (PST) To: Jan Kratochvil cc: Paul Hilfinger , gdb-patches@sourceware.org Subject: Re: [RFA] Have block_innermost_frame start from selected frame In-reply-to: <20111228130130.GA1855@host2.jankratochvil.net> References: <20111227195809.672D892BF6@kwai.gnat.com> <20111228130130.GA1855@host2.jankratochvil.net> Comments: In-reply-to Jan Kratochvil message dated "Wed, 28 Dec 2011 14:01:30 +0100." Date: Thu, 29 Dec 2011 20:30:00 -0000 Message-ID: <28663.1325185294@tully.CS.Berkeley.EDU> From: Paul Hilfinger 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/msg00890.txt.bz2 > In such case the doc should be updated, particularly that it has became now > related to the currently selected frame. Will do. > It may be all even more tricky than it was before. What about using query() > if such reference is ambiguous? > > It may not be so easy determining the ambiguity. Something like checking > symbol_read_needs_frame() and then also checking if there exist >= 2 different > frames containing the block. I understand the argument here, but I'm not sure I can agree. The ambiguity you speak of already occurs with high frequency, after all, since when I say print x there may be many local x's lying around, both recursive instances of the same definition or instances of unrelated definitions. Programmers are expected to understand this and already have a mechanism for specifying which they mean (up/frame/down). It is a very common situation (especially for someone like me who is always playing around with compilers in which a significant percentage of calls are recursive). I am inclined to think, therefore, that warnings would not be considered helpful. > 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) Good point. In fact, do you think we should change the function name? The frame is no longer "innermost", after all. Paul Hilfinger