public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>,
	 Joel Brobecker <brobecker@adacore.com>,
	 Yao Qi <qiyaoltc@gmail.com>,  Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH v5] Add support for the readnever concept
Date: Sat, 02 Dec 2017 02:31:00 -0000	[thread overview]
Message-ID: <874lp997yg.fsf@redhat.com> (raw)
In-Reply-To: <6ec7b656-9079-5cb2-d2e8-42eaf209887f@redhat.com> (Pedro Alves's	message of "Fri, 1 Dec 2017 23:19:42 +0000")

On Friday, December 01 2017, Pedro Alves wrote:

> On 12/01/2017 10:16 PM, Sergio Durigan Junior wrote:
>> Changes from v4:
>> 
>> - Cleaned-up the commit message and ChangeLogs.
>> 
>> - Simplified condition when checking for readnever.  Removed "top.h"
>>   from files that didn't need it.
>> 
>> - Added xref to "-readnever" option (on symbol-file command) pointing
>>   to "--readnever".
>> 
>> - Merged READNOW_HELP and READNEVER_HELP.
>> 
>> 
>> The purpose of this concept is to turn the load of debugging
>> information off, either globally (via the '--readnever' option), or
>> objfile-specific.  The implementation proposed here is an extension of
>> the patch distributed with Fedora GDB; looking at the Fedora patch
>> itself and the history, one can see some reasons why it was never
>> resubmitted:
>> 
>>   - The patch appears to have been introduced as a workaround, at
>>     least initially;
>>   - The patch is far from perfect, as it simply shunts the load of
>>     DWARF debugging information, without really worrying about the
>>     other debug format.
>>   - Who really does non-symbolic debugging anyways?
>> 
>> One use of this feature 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.
>> 
>> This patch expands the version shipped with Fedora GDB in order to
>> make the feature available for all the debuginfo backends, not only
>> for DWARF.  It also implements a per-objfile flag which can be
>> activated by using the "-readnever" command when using the
>> 'add-symbol-file' or 'symbol-file' commands.
>> 
>> It's also worth mentioning that this patch tests whether GDB correctly
>> fails to initialize if both '--readnow' and '--readnever' options are
>> passed.
>> 
>> Tested on the BuildBot.
>> 
>> gdb/ChangeLog:
>> 
>> 2017-12-01  Andrew Cagney  <cagney@redhat.com>
>> 	    Joel Brobecker  <brobecker@adacore.com>
>> 	    Sergio Durigan Junior  <sergiodj@redhat.com>
>> 
>> 	* NEWS (Changes since GDB 8.0: Mention new '--readnever'
>> 	feature.
>> 	* coffread.c (coff_symfile_read): Do not map over sections with
>> 	'coff_locate_sections' if readnever is on.
>> 	* dwarf2read.c (dwarf2_has_info): Return 0 if
>> 	readnever is on.
>> 	* elfread.c (elf_symfile_read): Do not map over sections with
>> 	'elf_locate_sections' if readnever is on.
>> 	* main.c (validate_readnow_readnever): New function.
>> 	(captured_main_1): Add support for --readnever.
>> 	(print_gdb_help): Document --readnever.
>> 	* objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
>> 	flag.
>> 	* symfile.c (readnever_symbol_files): New global.
>> 	(symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
>> 	'READNEVER_SYMBOL_FILES' is set.
>> 	(validate_readnow_readnever): New function.
>> 	(symbol_file_command): Handle '-readnever' option.
>> 	Call 'validate_readnow_readnever'.
>> 	(add_symbol_file_command): Handle '-readnever' option.
>> 	Call 'validate_readnow_readnever'.
>> 	(_initialize_symfile): Document new '-readnever' option for
>> 	both 'symbol-file' and 'add-symbol-file' commands.
>> 	* top.h (readnever_symbol_files): New extern global.
>> 	* xcoffread.c (xcoff_initial_scan): Do not read debug
>> 	information if readnever is on.
>> 
>> gdb/doc/ChangeLog:
>> 
>> 2017-12-01  Andrew Cagney  <cagney@redhat.com>
>> 	    Joel Brobecker  <brobecker@adacore.com>
>> 	    Sergio Durigan Junior  <sergiodj@redhat.com>
>> 
>> 	* gdb.texinfo (File Options): Document --readnever.
>> 	(Commands to Specify Files): Likewise, for 'symbol-file' and
>> 	'add-symbol-file'.
>> 
>> gdb/testsuite/ChangeLog:
>> 
>> 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
>> 	    Sergio Durigan Junior  <sergiodj@redhat.com>
>> 	    Pedro Alves  <palves@redhat.com>
>> 
>> 	* gdb.base/readnever.c, gdb.base/readnever.exp: New files.
>
> OK.

Pushed:

97cbe998d0dd5c13a0317fbb24d745da367d8caa

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/

  reply	other threads:[~2017-12-02  2:31 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 20:54 [RFC/RFA] Add support for the --readnever command-line option (DWARF only) Joel Brobecker
2016-07-12 14:27 ` Yao Qi
2016-10-04 18:07   ` Pedro Alves
2017-11-23  0:54     ` [PATCH v2] " Sergio Durigan Junior
2017-11-23 12:09       ` Pedro Alves
2017-11-23 17:21         ` Sergio Durigan Junior
2017-11-23 17:29           ` Pedro Alves
2017-11-24  4:54             ` Sergio Durigan Junior
2017-11-24 13:18               ` Pedro Alves
2017-11-24 20:27                 ` Sergio Durigan Junior
2017-11-27 19:13                   ` Pedro Alves
2017-11-29  0:59                     ` Sergio Durigan Junior
2017-11-29 12:23                       ` Pedro Alves
2017-11-23 15:59       ` Eli Zaretskii
2017-11-23 19:36         ` Sergio Durigan Junior
2016-10-04 18:06 ` [RFC/RFA] " Pedro Alves
2017-11-24 23:01 ` [PATCH v2] Add support for the --readnever command-line option Sergio Durigan Junior
2017-11-25  7:33   ` Eli Zaretskii
2017-11-25 16:41     ` Sergio Durigan Junior
2017-11-25 17:16       ` Eli Zaretskii
2017-11-29  1:21 ` [PATCH v3] Add support for the readnever concept Sergio Durigan Junior
2017-11-29  3:39   ` Eli Zaretskii
2017-11-29 12:25   ` Pedro Alves
2017-11-29 18:43     ` Sergio Durigan Junior
2017-11-29 21:45     ` [PATCH] Make 'symbol-file' not care about the position of command line arguments Sergio Durigan Junior
2017-11-29 22:26       ` Pedro Alves
2017-11-29 22:42         ` Sergio Durigan Junior
2017-11-29 23:15           ` Pedro Alves
2017-11-30  0:08             ` Sergio Durigan Junior
2017-11-30  0:34               ` Pedro Alves
2017-11-30  4:07                 ` Sergio Durigan Junior
2017-11-30  4:25       ` [PATCH v2] Make '{add-,}symbol-file' " Sergio Durigan Junior
2017-11-30 10:57         ` Pedro Alves
2017-11-30 12:38           ` Sergio Durigan Junior
2017-11-30 12:49             ` Pedro Alves
2017-11-30 13:06               ` Sergio Durigan Junior
2017-11-30 13:33       ` [PATCH v3] " Sergio Durigan Junior
2017-11-30 15:01         ` Pedro Alves
2017-11-30 17:26           ` Sergio Durigan Junior
2017-11-30 17:37             ` Pedro Alves
2017-11-30 17:43               ` Sergio Durigan Junior
2017-11-30 17:50                 ` Pedro Alves
2017-11-30 20:00       ` [PATCH v4] " Sergio Durigan Junior
2017-12-01 12:11         ` Pedro Alves
2017-12-01 17:41           ` Sergio Durigan Junior
2017-12-01 21:45             ` Pedro Alves
2017-12-01 22:02               ` Sergio Durigan Junior
2017-11-30  0:25 ` [PATCH v4] Add support for the readnever concept Sergio Durigan Junior
2017-11-30 11:53   ` Pedro Alves
2017-12-01  4:35     ` Sergio Durigan Junior
2017-12-01 12:43       ` Pedro Alves
2017-12-01 17:19         ` Tom Tromey
2017-12-01 17:21           ` Sergio Durigan Junior
2017-12-01 20:00             ` Pedro Alves
2017-12-01 22:16 ` [PATCH v5] " Sergio Durigan Junior
2017-12-01 23:19   ` Pedro Alves
2017-12-02  2:31     ` Sergio Durigan Junior [this message]
2017-12-02  8:21   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874lp997yg.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=qiyaoltc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).