This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/RFA] Add support for the --readnever command-line option (DWARF only)
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, Joel Brobecker <brobecker at adacore dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 4 Oct 2016 19:06:50 +0100
- Subject: Re: [RFC/RFA] Add support for the --readnever command-line option (DWARF only)
- Authentication-results: sourceware.org; auth=none
- References: <1467838463-15786-1-git-send-email-brobecker@adacore.com> <CAH=s-PMEfPZKPEUPJyGe8skZYE-Th5AP_SSGwz0VSkmfb_Op0Q@mail.gmail.com>
On 07/12/2016 03:27 PM, Yao Qi wrote:
> Hi Joel,
>
> On Wed, Jul 6, 2016 at 9:54 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> Hello,
>>
>> One of our customers asked us about this option, which they could
>> see as being available in the version of GDB shipped by RedHat but
>> not in the version that AdaCore supports.
>>
>> The purpose of this option is to turn the load of debugging information
>> off. The implementation proposed here is mostly a copy of the patch
>> distributed with RedHat Fedora, and looking at the patch itself and
>> the history, I can see some reasons why it was never submitted:
>
> Andrew Cagney posted the patch
> https://www.sourceware.org/ml/gdb/2004-11/msg00216.html
>
>> - 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?
>
> The reason, IMO, it was posted is that people want GDB avoid reading
> debug info and efficiently dump stack backtrace. I think Red Hat people
> must know why Fedora is shipping this patch.
>
> I don't object to this approach.
>
This predates my gdb involvement, I don't really know the history.
Maybe Jan knows.
In any case, I don't object to the approach.
Is this skipping _unwind_ info as well though? I think the
documentation should be clear on that, because if it does
skip dwarf info for unwinding as well, then you
may get a faster, but incorrect backtrace.
Thanks,
Pedro Alves