From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8857 invoked by alias); 27 Jul 2019 17:06:02 -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 8849 invoked by uid 89); 27 Jul 2019 17:06:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.0 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=arranged 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 17:06:00 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hrQ8s-0002iv-Bk; Sat, 27 Jul 2019 13:05:58 -0400 Received: from [176.228.60.248] (port=1506 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hrQ8r-0006Bb-5r; Sat, 27 Jul 2019 13:05:57 -0400 Date: Sat, 27 Jul 2019 17:06:00 -0000 Message-Id: <83lfwjl861.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess CC: gdb-patches@sourceware.org, Richard.Bunt@arm.com In-reply-to: (message from Andrew Burgess on Sat, 27 Jul 2019 17:22:35 +0100) Subject: Re: [PATCH 7/7] gdb: Add new commands to list module variables and functions References: 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/msg00618.txt.bz2 > From: Andrew Burgess > Cc: Richard Bunt , Andrew Burgess > Date: Sat, 27 Jul 2019 17:22:35 +0100 > > diff --git a/gdb/NEWS b/gdb/NEWS > index 14c931602f4..9b7e6cc1c71 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -110,6 +110,20 @@ info modules [-q] [REGEXP] > their DWARF (for example Fortran) will give any results for this > command. > > +info module functions [-q] [-m MODULE_REGEXP] [-t TYPE_REGEXP] [REGEXP] > + Return a list of functions within all modules, grouped by module. > + The list of functions can be restricted with the optional regular > + expressions. MODULE_REGEXP matches against the module name, > + TYPE_REGEXP matches against the function type signature, and REGEXP > + matches against the function name. > + > +info module variables [-q] [-m MODULE_REGEXP] [-t TYPE_REGEXP] [REGEXP] > + Return a list of variables within all modules, grouped by module. > + The list of variables can be restricted with the optional regular > + expressions. MODULE_REGEXP matches against the module name, > + TYPE_REGEXP matches against the variable type, and REGEXP matches > + against the variable name. Modulo the explanation of what is a module, this part is OK. > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -18633,6 +18633,40 @@ > printing header information and messages explaining why no functions > have been printed. > > +@kindex info module functions > +@cindex modules > +@cindex functions > +@cindex module functions > +@item info module functions [-q] [-m @var{module-regexp}] [-t @var{type-regexp}] [@var{regexp}] > +List all functions within all modules. The set of functions listed > +can be limited by providing some or all of the optional regular > +expressions. If @var{module-regexp} is provided, then only modules > +matching @var{module-regexp} will be searched. Only functions whose > +type matches the optional regular expression @var{type-regexp} will be > +listed. And only functions whose name matches the optional regular > +expression @var{regexp} will be listed. > + > +The optional flag @samp{-q}, which stands for @samp{quiet}, disables > +printing header information and messages explaining why no functions > +have been printed. > + > +@kindex info module variables > +@cindex modules > +@cindex variables > +@cindex module variables > +@item info module variables [-q] [-m @var{module-regexp}] [-t @var{type-regexp}] [@var{regexp}] > +List all variables within all modules. The set of variables listed > +can be limited by providing some or all of the optional regular > +expressions. If @var{module-regexp} is provided, then only modules > +matching @var{module-regexp} will be searched. Only variables whose > +type matches the optional regular expression @var{type-regexp} will be > +listed. And only variables whose name matches the optional regular > +expression @var{regexp} will be listed. > + > +The optional flag @samp{-q}, which stands for @samp{quiet}, disables > +printing header information and messages explaining why no variables > +have been printed. These two commands are very similar, so I would suggest to describe both of them in the same text, instead of repeating almost the same description twice. > + c = add_cmd ("functions", class_info, info_module_functions_command, _("\ > +Display functions within each module.\n\ I'd say instead "Display functions arranged by modules." Thanks.