Re: [PATCH v2] Add support for the --readnever command-line option (DWARF only)

Sergio Durigan Junior
2017-11-23T19:36:17Z

On Thursday, November 23 2017, Eli Zaretskii wrote:

>> From: Sergio Durigan Junior <sergiodj@redhat.com>
>> Cc: Yao Qi <qiyaoltc@gmail.com>, Joel Brobecker <brobecker@adacore.com>, "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
>> Date: Wed, 22 Nov 2017 19:54:53 -0500
>>
>> - 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 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 use case should be mentioned in the manual. And I think if we
> want to accept a patch that is DWARF specific, the name of the option
> should reflect that; --readnever sounds misleading to me.
>
> (Another possibility would be to have a "maint dwarf" command to do
> the same; maybe it's better.)

Thanks for the review, Eli.

According to Pedro's comments, I am working on the patch to make the
feature available to other backends as well, so parts of the text will
be changed.

As for the use case, I've included it in the manual, as per Pedro's
suggestion.

>> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
>> index ab05a3718d..7d3d651185 100644
>> --- a/gdb/doc/gdb.texinfo
>> +++ b/gdb/doc/gdb.texinfo
>> @@ -1037,6 +1037,14 @@ 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.
>> +
>> +This option is currently limited to debug information in DWARF format.
>> +For all other format, this option has no effect.
> ^^^^^^^^^^^^^^^^^^^^
> "For the others formats"

Thanks; this part will most likely change due to the extension of the
feature to the other backends.

> And I think we need a NEWS entry for this new feature.

Already added it.

Thanks,

--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible