From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8459 invoked by alias); 1 Feb 2012 11:52:14 -0000 Received: (qmail 8445 invoked by uid 22791); 1 Feb 2012 11:52:13 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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, 01 Feb 2012 11:52:01 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q11Bpxt6004623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 1 Feb 2012 06:52:00 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q11BpwSO016931; Wed, 1 Feb 2012 06:51:58 -0500 Message-ID: <4F29275E.2070403@redhat.com> Date: Wed, 01 Feb 2012 11:52:00 -0000 From: Phil Muldoon User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Doug Evans CC: Tom Tromey , gdb-patches@sourceware.org Subject: Re: RFA: fix PR python/13351 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2012-02/txt/msg00006.txt.bz2 On 01/31/2012 11:13 PM, Doug Evans wrote: > On Tue, Jan 31, 2012 at 1:59 PM, Tom Tromey wrote: >> This fixes PR python/13351. >> >> The bug is that gdb.lookup_symbol required a current frame, but this >> restriction doesn't really make sense. It is ok to look up global >> symbols without a current frame. >> >> This patch just lifts the restriction. >> >> This requires a doc review. >> >> Built and regtested on x86-64 Fedora 15. >> >> Tom >> >> 2012-01-31 Tom Tromey >> >> PR python/13351: >> * python/py-symbol.c (gdbpy_lookup_symbol): Work even when there >> is no frame. > I think a bit of discussion is needed. [Sorry!] > > There is also lookup_global_symbol. > Are we sure we want lookup_symbol to work when there is no frame? > [it doesn't feel very clean to me, but maybe I just need to look at it > differently] I agree that two APIs for the same functionality are a pain. However we have to keep them for backwards compatibility. However, can we not deprecated and even gut lookup_global_symbol to call lookup_symbol with a frame? Cheers, Phil