[cfe-dev] Should -g1 mean -gline-tables-only?

Eric Christopher echristo at google.com
Fri Oct 17 10:50:08 PDT 2014


We could make -g1 into -gline-tables-only. It at least matches the ibm
definition. We won't include external variables and do have line numbers so
it's not quite the same as the documented gcc bits, but those could
probably be changed at this point anyhow. I'll talk to the gcc guys on that
side, but I'll happily approve a patch making -g1 an alias for
-gmlt/-gline-tables-only

-eric

On Fri, Oct 17, 2014 at 10:37 AM, Hal Finkel <hfinkel at anl.gov> wrote:

> Hi,
>
> Debugging flags are not my area of expertise, but GCC's manual says about
> -g1:
>
> [from GCC's man page]
> Level 1 produces minimal information, enough for making backtraces in
> parts of the program that you don't plan to debug.
> This includes descriptions of functions and external variables, but no
> information about local variables and no line numbers.
> [end from GCC's man page]
>
> and IBM's manual for xlc says about -g1:
>
> [from IBM's man page]
> Generates minimal read-only debugging information about line numbers and
> source file names. No program state is preserved.
> [end from IBM's man page]
>
> this sounds to me a lot like what -gline-tables-only does. Is there a
> reason we don't alias -g1 to -gline-tables-only? Currently, the code in
> Clang::ConstructJob treats it just like -g.
>
> Thanks again,
> Hal
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141017/45537d27/attachment.html>


More information about the cfe-dev mailing list