From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75831 invoked by alias); 31 Jul 2019 14:51:40 -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 75823 invoked by uid 89); 31 Jul 2019 14:51:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=dozen 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; Wed, 31 Jul 2019 14:51:38 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hspx2-00087U-NN; Wed, 31 Jul 2019 10:51:36 -0400 Received: from [176.228.60.248] (port=3001 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hspx2-0007x0-5X; Wed, 31 Jul 2019 10:51:36 -0400 Date: Wed, 31 Jul 2019 14:51:00 -0000 Message-Id: <83blxai7f5.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess CC: gdb-patches@sourceware.org, Richard.Bunt@arm.com In-reply-to: <20190730210245.GN23204@embecosm.com> (message from Andrew Burgess on Tue, 30 Jul 2019 22:02:45 +0100) Subject: Re: [PATCH 1/7] gdb: Add new -n flag to some info commands References: <83o91fl9b9.fsf@gnu.org> <20190730210245.GN23204@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-07/txt/msg00674.txt.bz2 > Date: Tue, 30 Jul 2019 22:02:45 +0100 > From: Andrew Burgess > Cc: gdb-patches@sourceware.org, Richard.Bunt@arm.com > > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -215,6 +215,11 @@ maint show test-options-completion-result > printing of some header information in a similar fashion to "info > variables" and "info functions". > > + ** The "info variables", "info functions", and "whereis" commands > + now take a '-n' flag that excludes non-debug symbols (symbols > + from the ELF's symbol table, rather than from the DWARf) from the > + results. This is good, except that I wouldn't mention "ELF", because this feature also works for non-ELF binaries, right? So I'd just say "symbols from the symbol table, not from the debug info such as DWARF". > +The function information comes from two sources, the debug information > +associated with the executable (for example DWARF), but also non-debug > +symbols are included in the results, these are symbols taken from the > +symbol table of the executable. A non-debug symbol is only included > +if it is for a symbol in an executable section. The @samp{-n} flag > +excludes non-debugging symbols from the results. My suggestion is to reverse the order: first say what -n does, then explain the terminology: The @samp{-n} flag excludes @dfn{non-debugging symbols} from the results. A non-debugging symbol is a symbol that comes from the executable's symbol table, not from the debug information (for example, DWARF) associated with the executable. > @@ -18574,7 +18581,7 @@ > > > @kindex info variables > -@item info variables [-q] > +@item info variables [-q] [-n] > Print the names and data types of all variables that are defined > outside of functions (i.e.@: excluding local variables). > The printed variables are grouped by source files and annotated with > @@ -18587,11 +18594,18 @@ > language of the variable, other values mean to use > the manually specified language (see @ref{Manually, ,Set Language Manually}). > > +The variable information comes from two sources, the debug information > +associated with the executable (for example DWARF), but also non-debug > +symbols are included in the results, these are symbols taken from the > +symbol table of the executable. A non-debug symbol is only included > +if it is for a symbol in a data section. The @samp{-n} flag excludes > +non-debugging symbols from the results. Instead of repeating the same text just a few dozen lines after the first instance, I'd just use "non-debugging symbols" here, because they were already defined above. IOW, keep the last sentence only. Thanks.