This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH GCC]Add 'force-dwarf-lexical-blocks' command line option
- From: Andrew Pinski <pinskia at gmail dot com>
- To: "Herman, Andrei" <Andrei_Herman at codesourcery dot com>
- Cc: Mike Stump <mikestump at comcast dot net>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 7 May 2014 10:25:44 -0700
- Subject: Re: [PATCH GCC]Add 'force-dwarf-lexical-blocks' command line option
- Authentication-results: sourceware.org; auth=none
- References: <FEC4CADEDABC9E40A1EC17465AAC8402AE41BF45 at EU-MBX-04 dot mgc dot mentorg dot com> <2D109B97-5829-4339-B76F-05ADE05EC61F at comcast dot net> <FEC4CADEDABC9E40A1EC17465AAC8402AE41C0BB at EU-MBX-04 dot mgc dot mentorg dot com>
On Wed, May 7, 2014 at 10:19 AM, Herman, Andrei
> Thanks for the suggestion.
> The current patch includes the following text added in gcc/doc/invoke.texi:
> @item -fforce-dwarf-lexical-blocks
> Produce debug information (a DW_TAG_lexical_block) for every function
> body, loop body, switch body, case statement, if-then and if-else statement,
> even if the body is a single statement. Likewise, a lexical block will be
> emitted for the first label of a statement. This block ends at the end of the
> current lexical scope, or when a break, continue, goto or return statement is
> encountered at the same lexical scope level.
> This option is available when using DWARF Version 4 or higher.
> I can add the suggested sentence at the beginning of the description, to save time for users not interested in the more detailed explanation.
Also be explicit that the option only applies to C/C++ code in the
> Andrei Herman
> Mentor Graphics Corporation
> Israel branch
>> -----Original Message-----
>> From: Mike Stump [mailto:email@example.com]
>> Sent: Wednesday, May 07, 2014 7:00 PM
>> To: Herman, Andrei
>> Cc: firstname.lastname@example.org; Herman_Andrei@mentor.com
>> Subject: Re: [PATCH GCC]Add 'force-dwarf-lexical-blocks' command line
>> On May 7, 2014, at 2:32 AM, Herman, Andrei
>> <Andrei_Herman@codesourcery.com> wrote:
>> > However, code coverage tools that process the DWARF debug information
>> > to implement block/path coverage need more complete lexical block
>> So, it would be nice to give a hint in the actual documentation, why a user
>> might use the flag, or for a maintainer to be able to predict exactly what
>> was desired in some obscure corner of dwarf semantics given the
>> documentation. I think it can be as simple as "This option is useful for code
>> coverage tools that utilize the dwarf debug information." A user, upon
>> seeing that, would then ask, do I have such a tool, say no, and then know
>> they don't have to contemplate the goodness of the option further. If one
>> is writing a coverage tool, upon seeing the documentation, they might then
>> ask themselves, how might I use that flag profitably for my users.