From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47464 invoked by alias); 10 Nov 2019 22:37:33 -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 47456 invoked by uid 89); 10 Nov 2019 22:37:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.1 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_JMF_BL,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=no version=3.3.1 spammy=objfile X-HELO: mail-oi1-f193.google.com Received: from mail-oi1-f193.google.com (HELO mail-oi1-f193.google.com) (209.85.167.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 10 Nov 2019 22:37:32 +0000 Received: by mail-oi1-f193.google.com with SMTP id n14so9850643oie.13 for ; Sun, 10 Nov 2019 14:37:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=alChFgfv09J5J+YMreQNG2v6LCCIRFddtJTX4GGw0Sw=; b=cBQ2Gc+uD016KpK5Sbzs3z+Yzd/IsfLSxNy6Oe63dpfeVpI7VXQeZTf3iOD/0CnMFV UMkqiZakdgPCISS3eYsjqsHJIeop61q7ivGYymmG8S0FnOv1HZRgS2bCUTv5RiPLpXK/ TdHWuhsZgY/Q3nkS/dVgO9lhi4rQ/yQMNOcA9cr4daujEz6jZ4N/3MCN/nhKJBSFGAY4 oTcf/Dxx18X8ZCTNwQxib6ZeUb8VIA4rffI9QjOASpYZ+KbL6Ul30eCQ33JNB2Yae/6A 3Wx7TWyi2lX6tkVnBZ5sLu7bmAivy2gq+bBBB/MycrqRguyW3Sv31njVDvTg1Wk3VF/f bztQ== MIME-Version: 1.0 References: <20191015164647.1837-1-andrew.burgess@embecosm.com> <32eba92d-55a9-5694-cec5-80001d8ff1ae@simark.ca> <20191023191354.GH4962@embecosm.com> <20191101115304.GR4962@embecosm.com> <20191104171204.GB11037@embecosm.com> <20093265-f125-8668-d7ba-0c36b07a53ec@simark.ca> <20191110222731.GH11037@embecosm.com> In-Reply-To: <20191110222731.GH11037@embecosm.com> From: "Christian Biesinger via gdb-patches" Reply-To: Christian Biesinger Date: Sun, 10 Nov 2019 22:37:00 -0000 Message-ID: Subject: Re: [PATCH] gdb/python: Introduce gdb.lookup_all_static_symbols To: Andrew Burgess Cc: Simon Marchi , gdb-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00279.txt.bz2 On Sun, Nov 10, 2019 at 4:27 PM Andrew Burgess wrote: > > * Christian Biesinger [2019-11-09 00:23:00 -0600]: > > > On Mon, Nov 4, 2019 at 12:28 PM Simon Marchi wrote: > > > > > > On 2019-11-04 12:12 p.m., Andrew Burgess wrote: > > > > How about I merged patches #1 and #2, but drop #3 for now? This would > > > > give: > > > > > > > > lookup_static_symbol - returns the global static symbol for the > > > > current compilation unit, or whatever else GDB can find if > > > > there's nothing in the current CU. This is basically inline > > > > with what we get from 'print symbol_name' at the CLI (if we > > > > limit symbol_name to just global static things). > > > > > > > > AND, > > > > > > > > lookup_static_symbols - returns the list of all global static > > > > symbols. > > > > > > > > We no longer have a block parameter passed to 'lookup_static_symbol', > > > > so hopefully and confusion can be avoided. If/when we later add a > > > > Python wrapper for CU we can _extend_ the API for lookup_static_symbol > > > > to also take a CU and so provide the "look over there" type behaviour > > > > in a clearer way. > > > > > > > > Would everyone be happy with this? > > > > > > I certainly would, I think that brings us back to the same place we were before > > > it was suggested to add the block parameter, doesn't it? > > > > Sorry for the late reply & for confusing things -- yes, after reading > > through all the discussions I think that's the best way forward. > > Thanks for the feedback. > > I've now pushed patches #1 and #2. Thanks! By the way, should Objfile also get a lookup_static_symbols method now, similar to Objfile.lookup_static_symbol? (I don't personally have a use-case for this, but figured I should ask) Christian