From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7358 invoked by alias); 7 May 2014 17:25:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7337 invoked by uid 89); 7 May 2014 17:25:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f179.google.com Received: from mail-vc0-f179.google.com (HELO mail-vc0-f179.google.com) (209.85.220.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 07 May 2014 17:25:46 +0000 Received: by mail-vc0-f179.google.com with SMTP id im17so1732383vcb.10 for ; Wed, 07 May 2014 10:25:44 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.220.167.2 with SMTP id o2mr40054353vcy.8.1399483544501; Wed, 07 May 2014 10:25:44 -0700 (PDT) Received: by 10.58.243.98 with HTTP; Wed, 7 May 2014 10:25:44 -0700 (PDT) In-Reply-To: References: <2D109B97-5829-4339-B76F-05ADE05EC61F@comcast.net> Date: Wed, 07 May 2014 17:25:00 -0000 Message-ID: Subject: Re: [PATCH GCC]Add 'force-dwarf-lexical-blocks' command line option From: Andrew Pinski To: "Herman, Andrei" Cc: Mike Stump , "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00420.txt.bz2 On Wed, May 7, 2014 at 10:19 AM, Herman, Andrei wrote: > 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 documentation. Thanks, Andrew Pinski > > Regards, > Andrei Herman > Mentor Graphics Corporation > Israel branch > > >> -----Original Message----- >> From: Mike Stump [mailto:mikestump@comcast.net] >> Sent: Wednesday, May 07, 2014 7:00 PM >> To: Herman, Andrei >> Cc: gcc-patches@gcc.gnu.org; Herman_Andrei@mentor.com >> Subject: Re: [PATCH GCC]Add 'force-dwarf-lexical-blocks' command line >> option >> >> On May 7, 2014, at 2:32 AM, Herman, Andrei >> wrote: >> > However, code coverage tools that process the DWARF debug information >> > to implement block/path coverage need more complete lexical block >> information. >> >> 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.