From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79939 invoked by alias); 27 Jul 2019 07:52:31 -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 79931 invoked by uid 89); 27 Jul 2019 07:52:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=U*gdb-patches, gdbpatchessourcewareorg, sk:gdb-pat, gdb-patches@sourceware.org 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; Sat, 27 Jul 2019 07:52:30 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hrHVD-0003c5-CQ; Sat, 27 Jul 2019 03:52:28 -0400 Received: from [176.228.60.248] (port=2853 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hrHVC-0002XM-SI; Sat, 27 Jul 2019 03:52:27 -0400 Date: Sat, 27 Jul 2019 07:52:00 -0000 Message-Id: <838ssjnccp.fsf@gnu.org> From: Eli Zaretskii To: Christian Biesinger CC: gdb-patches@sourceware.org In-reply-to: <20190727003056.41789-1-cbiesinger@google.com> (gdb-patches@sourceware.org) Subject: Re: [PATCH v3] Add Objfile.lookup_{global,static}_symbol functions References: <20190726013824.230132-1-cbiesinger@google.com> <20190727003056.41789-1-cbiesinger@google.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-07/txt/msg00603.txt.bz2 > Date: Fri, 26 Jul 2019 19:30:56 -0500 > From: "Christian Biesinger via gdb-patches" > Cc: Christian Biesinger > > diff --git a/gdb/NEWS b/gdb/NEWS > index cc1d58520d..d8fb4cfe7f 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -36,6 +36,9 @@ > ** gdb.Type has a new property 'objfile' which returns the objfile the > type was defined in. > > + ** gdb.Objfile has new methods 'lookup_global_symbol' and > + 'lookup_static_symbol' to lookup a symbol from this objfile only. > + This part is OK. > +@defun Objfile.lookup_global_symbol (name @r{[}, domain@r{]}) > +Search for a global symbol named @var{name} in this objfile. Optionally, the > +search scope can be restricted with the @var{domain} argument. > +The @var{domain} argument must be a domain constant defined in the @code{gdb} > +module and described in @ref{Symbols In Python}. This function is similar to > +@code{gdb.lookup_global_symbol}, except that the search is limited to this > +objfile. > + > +The result is a @code{gdb.Symbol} object or @code{None} if the symbol > +is not found. > +@end defun > + > +@defun Objfile.lookup_global_symbol (name @r{[}, domain@r{]}) I guess you meant lookup_static_symbol here? > +Search for a global symbol with static linkage named @var{name} in this > +objfile. Optionally, the search scope can be restricted with the @var{domain} > +argument. > +The @var{domain} argument must be a domain constant defined in the @code{gdb} > +module and described in @ref{Symbols In Python}. This function is similar to > +@code{gdb.lookup_global_symbol}, except that the search is limited to this > +objfile. > + > +The result is a @code{gdb.Symbol} object or @code{None} if the symbol > +is not found. > +@end defun As the description of both methods is almost identical, I wonder whether it wouldn't be better to have the second method be described as "Like @code{lookup_global_symbol}, but ..." and tell the differences between them. Thanks.