From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116164 invoked by alias); 23 Sep 2019 17:18:50 -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 116155 invoked by uid 89); 23 Sep 2019 17:18:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:142, H*r:sk:RSA_AES, HX-Languages-Length:1137, H*r:4.82 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 23 Sep 2019 17:18:47 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iCRz3-0007sQ-Ot; Mon, 23 Sep 2019 13:18:45 -0400 Received: from [176.228.60.248] (port=2217 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iCRz3-0007Iq-8d; Mon, 23 Sep 2019 13:18:45 -0400 Date: Mon, 23 Sep 2019 17:18:00 -0000 Message-Id: <83blvborrm.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess CC: gdb-patches@sourceware.org, cbiesinger@google.com In-reply-to: <20190923164638.13710-1-andrew.burgess@embecosm.com> (message from Andrew Burgess on Mon, 23 Sep 2019 17:46:38 +0100) Subject: Re: [PATCH] gdb/python: smarter symbol lookup for gdb.lookup_static_symbol References: <20190923164638.13710-1-andrew.burgess@embecosm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00449.txt.bz2 > From: Andrew Burgess > Cc: Christian Biesinger , Andrew Burgess > Date: Mon, 23 Sep 2019 17:46:38 +0100 > > +There can be multiple global symbols with static linkage with the same > +name. This function will only return the first matching symbol that > +it finds. Which symbol is found depends on where @value{GDBN} is > +currently stopped, as @value{GDBN} will first search for matching > +symbols in the current object file, and then search all other object > +files. If the application is not yet running then @value{GDBN} will > +search all object files. I don't understand the last sentence: AFAIU, GDB will search "all" object files even if the program runs, it just will start from the current object file. So the last sentence should instead explain in which order will GDB search the object files when the debuggee is not yet running, i.e. what will be the first examined object file. Am I missing something? Otherwise, the documentation part is approved. Thanks.