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: "Herman, Andrei" <Andrei_Herman at codesourcery dot com>
- To: "pinskia at gmail dot com" <pinskia at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "Herman, Andrei" <Andrei_Herman at codesourcery dot com>, "Rozenman, Alex" <Alex_Rozenman at mentor dot com>, "Inge, Meador" <meador_inge at mentor dot com>
- Date: Wed, 7 May 2014 09:43:01 +0000
- 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> <3CE258CF-D785-4311-8B17-58250768CF85 at gmail dot com>
Thanks for the note.
I will make the needed changes and resubmit.
Mentor Graphics Corporation
> -----Original Message-----
> From: firstname.lastname@example.org [mailto:email@example.com]
> Sent: Wednesday, May 07, 2014 12:37 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:
> > Hi,
> > Currently GCC only emits DWARF debug information
> > DIEs) for compound statements containing significant local declarations.
> > However, code coverage tools that process the DWARF debug information
> > to implement block/path coverage need more complete lexical block
> > This patch adds the necessary functionality under the control of a new
> > command line argument: -fforce-dwarf-lexical-blocks.
> > When this flag is set, a DW_TAG_lexical_block DIE will be emitted 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
> > labeled 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.
> > Consequently, any case in a switch statement that does not flow
> > through to the next case, will have its own dwarf lexical block.
> > The complete change proposal contains 4 patches (attached first 3):
> > 1. Add command line option -fforce-dwarf-lexical-blocks
> This option since it is specific to the c frontend should go into c.opt instead
> of common.opt. Unless you are going to extend this to Ada, Java and
> > 2. Use of flag_force_dwarf_blocks
> > 3. Create label scopes
> > A forth patch, extending the proposed functionality to C++ will be
> submitted in a separate message.
> > Attached are the proposed ChangeLog additions, named according to the
> directory each one belongs to.
> > Best regards,
> > Andrei Herman
> > Mentor Graphics Corporation
> > Israel branch
> > <gcc_c_ChangeLog>
> > <gcc_c-family_ChangeLog>
> > <gcc_ChangeLog>
> > <0001-Add-command-line-option-fforce_dwarf_lexical_blocks.patch>
> > <0002-Use-flag_force_dwarf_blocks.patch>
> > <0003-Create-label-scopes.patch>