From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46220 invoked by alias); 4 Nov 2019 18:28:42 -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 46212 invoked by uid 89); 4 Nov 2019 18:28:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=him X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Nov 2019 18:28:41 +0000 Received: from [172.16.0.155] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 8B8441E4C2; Mon, 4 Nov 2019 13:28:39 -0500 (EST) Subject: Re: [PATCH] gdb/python: Introduce gdb.lookup_all_static_symbols To: Andrew Burgess Cc: Christian Biesinger , gdb-patches References: <20191015141515.GW4962@embecosm.com> <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> From: Simon Marchi Message-ID: <20093265-f125-8668-d7ba-0c36b07a53ec@simark.ca> Date: Mon, 04 Nov 2019 18:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191104171204.GB11037@embecosm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-11/txt/msg00101.txt.bz2 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? But it's Christian who initially wanted to add these functions, he probably had a particular use case in mind. It would be up to him to say if that covers that use case or not. Simon