From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 599 invoked by alias); 25 Nov 2017 07:33:29 -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 586 invoked by uid 89); 25 Nov 2017 07:33:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KB_WAM_FROM_NAME_SINGLEWORD,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 25 Nov 2017 07:33:25 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIUxk-0008GY-S0 for gdb-patches@sourceware.org; Sat, 25 Nov 2017 02:33:24 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIUxa-00080n-Vc; Sat, 25 Nov 2017 02:33:11 -0500 Received: from [176.228.60.248] (port=3730 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eIUxZ-0003HI-V1; Sat, 25 Nov 2017 02:33:10 -0500 Date: Sat, 25 Nov 2017 07:33:00 -0000 Message-Id: <83k1ye95ju.fsf@gnu.org> From: Eli Zaretskii To: Sergio Durigan Junior CC: gdb-patches@sourceware.org, brobecker@adacore.com, qiyaoltc@gmail.com, palves@redhat.com In-reply-to: <20171124230122.27114-1-sergiodj@redhat.com> (message from Sergio Durigan Junior on Fri, 24 Nov 2017 18:01:22 -0500) Subject: Re: [PATCH v2] Add support for the --readnever command-line option Reply-to: Eli Zaretskii References: <1467838463-15786-1-git-send-email-brobecker@adacore.com> <20171124230122.27114-1-sergiodj@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00648.txt.bz2 > From: Sergio Durigan Junior > Cc: Joel Brobecker , > Yao Qi , > Pedro Alves , > Eli Zaretskii , > Sergio Durigan Junior > Date: Fri, 24 Nov 2017 18:01:22 -0500 > > diff --git a/gdb/NEWS b/gdb/NEWS > index 754ce103bd..32229d3cea 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -3,6 +3,10 @@ > > *** Changes since GDB 8.0 > > +* New "--readnever" command line option instructs GDB to not read each > + symbol file's symbolic debug information. This makes startup faster > + but at the expense of not being able to perform symbolic debugging. > + This part is okay, but I would add here as well a hint about the use cases this supports. Like this, for example: This option is intended for use cases where symbolic debugging will not be used, e.g., when you only need to dump the debuggee's core. > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index 00451d243d..f3eef8dfeb 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -1037,6 +1037,15 @@ Read each symbol file's entire symbol table immediately, rather than > the default, which is to read it incrementally as it is needed. > This makes startup slower, but makes future operations faster. > > +@item --readnever > +@cindex @code{--readnever} > +Do not read each symbol file's symbolic debug information. This makes > +startup faster but at the expense of not being able to perform > +symbolic debugging. DWARF unwind information is also not read, > +meaning backtraces may become incomplete or inaccurate. One use of > +this is when a user simply wants to do the following sequence: attach, > +dump core, detach. Loading the debugging information in this case is > +an unnecessary cause of delay. > @end table > > @node Mode Options > @@ -18486,6 +18495,14 @@ tables by using the @samp{-readnow} option with any of the commands that > load symbol table information, if you want to be sure @value{GDBN} has the > entire symbol table available. > > +@kindex readnever > +@cindex never read symbols > +@cindex symbols, never read > +@item symbol-file @r{[} -readnever @r{]} @var{filename} > +@itemx file @r{[} -readnever @r{]} @var{filename} > +You can instruct @value{GDBN} to never read the symbolic information > +contained in @var{filename} by using the @samp{-readnever} option. > + This will cause index entries about "readnever" point to 2 different places, with no way for the reader to tell up front which place is about where they want to go. So I suggest to change the index entries as follows: @cindex @code{--readnever}, command-line option ... @cindex @code{-readnever}, option for symbol-file command (Note that I switched from @kindex to @cindex, since @kindex is used for command names, and -readnever isn't.) Otherwise, the patch for the manual is OK. > @@ -1183,6 +1213,9 @@ Selection of debuggee and its files:\n\n\ > --se=FILE Use FILE as symbol file and executable file.\n\ > --symbols=SYMFILE Read symbols from SYMFILE.\n\ > --readnow Fully read symbol files on first access.\n\ > + --readnever Do not read symbol files.\n\ > + There is currently a known limitation that this only\n\ > + has an effect on symbol files provided in DWARF format.\n\ The part about its being limited to DWARF should now go away, right? Thanks.