This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: -femit-struct-debug-reduced/baseonly debug info
- From: Evgeny Gavrin <evgeny dot gavrin at hotmail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>, "slava dot garbuzov at gmail dot com" <slava dot garbuzov at gmail dot com>
- Date: Wed, 19 Jun 2013 19:47:33 +0000
- Subject: RE: -femit-struct-debug-reduced/baseonly debug info
- References: <SNT138-W101227728C29F752BE4608E28C0 at phx dot gbl>,<CAKOQZ8yEqQuOX2rUgDS+R3STe=sJSzb+AShnbxfVJeG5cnFDdw at mail dot gmail dot com>,<SNT138-W34826D6A50104453A32AE3E28C0 at phx dot gbl>,<CAKOQZ8wugm5-ecSdWa=Prw+RXohPGovuRiPYZGFfUjkdB_ivwQ at mail dot gmail dot com>,<SNT138-W39BAC072B763D75EAC66B1E28D0 at phx dot gbl>,<CAKOQZ8yY-fUD40izOWoTYbzxUXsAe6u9Ljnh5_KOcvQQUMqCKQ at mail dot gmail dot com>,<SNT138-W34F73E3548D34566ED1EE5E28D0 at phx dot gbl>,<CAKOQZ8zMdEvSxAUwfT_kYSaVGz2xLddzVeeNEY=_FARHr17smQ at mail dot gmail dot com>
Behavior of the compiler does not match the documentation.
The following "-femit-struct-debug-detailed=ind:ord:base" means that debug info should be emitted for structs used indirectly and declared in file that matches the base name of the compilation file (test.c/test.h).
So, in the particular case, when struct is used indirectly in test.c and declared in test-nonbase.h - info on structs shouldn't be emitted.
In case of, "-femit-struct-debug-detailed=ord:base" - it works correctly and emits nothing.
I think that there is a bug in interpretation of optional parameters.
/*
With optimism,
Evgeny Gavrin
email : evgeny.gavrin@hotmail.com
*/
----------------------------------------
> Date: Wed, 19 Jun 2013 11:08:05 -0700
> Subject: Re: -femit-struct-debug-reduced/baseonly debug info
> From: iant@google.com
> To: evgeny.gavrin@hotmail.com
> CC: gcc-help@gcc.gnu.org; slava.garbuzov@gmail.com
>
> On Wed, Jun 19, 2013 at 9:29 AM, Evgeny Gavrin
> <evgeny.gavrin@hotmail.com> wrote:
>>
>> This means that first optional parameter shouldn't affect so much. In case it's omitted debug info should be emitted both for [dir:] and [ind:].
>>
>> Two cases:
>> 1) test.c -O0 -g2 -femit-struct-debug-detailed=ind:ord:base
>>
>> opts->x_debug_struct_ordinary[usage] = files;
>>
>> 2) test.c -O0 -g2 -femit-struct-debug-detailed=ord:base
>>
>> opts->x_debug_struct_ordinary[DINFO_USAGE_DFN] = files;
>> opts->x_debug_struct_ordinary[DINFO_USAGE_DIR_USE] = files;
>> opts->x_debug_struct_ordinary[DINFO_USAGE_IND_USE] = files;
>>
>> What am I missing? On my view, there is smth wrong, or processing of this option has some additional shadow logic, that I failed to find.
>
>
> Are you saying that the behaviour of the compiler does not match the
> documentation? Or are you saying that you don't understand why it
> works? Or are you saying that the documentation is unclear?
>
> Ian