This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: -femit-struct-debug-reduced/baseonly debug info


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 		 	   		  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]