From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129705 invoked by alias); 25 Nov 2017 16:41:09 -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 129693 invoked by uid 89); 25 Nov 2017 16:41:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 25 Nov 2017 16:41:06 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BE78137E72; Sat, 25 Nov 2017 16:41:05 +0000 (UTC) Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8137060C94; Sat, 25 Nov 2017 16:41:05 +0000 (UTC) From: Sergio Durigan Junior To: Eli Zaretskii Cc: gdb-patches@sourceware.org, brobecker@adacore.com, qiyaoltc@gmail.com, palves@redhat.com Subject: Re: [PATCH v2] Add support for the --readnever command-line option References: <1467838463-15786-1-git-send-email-brobecker@adacore.com> <20171124230122.27114-1-sergiodj@redhat.com> <83k1ye95ju.fsf@gnu.org> Date: Sat, 25 Nov 2017 16:41:00 -0000 In-Reply-To: <83k1ye95ju.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 Nov 2017 09:32:53 +0200") Message-ID: <87indytiov.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00651.txt.bz2 Thanks for the review, Eli. On Saturday, November 25 2017, Eli Zaretskii wrote: >> 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. Good point. I added the text. >> 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.) Hm, I see. To be clear, I copied the entry above, which uses @kindex for the "readnow" symbol-file command. Maybe that should be fixed (in another patch), too? > 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? Right, I forgot to remove this line. Did it now. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/