http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55608



Jakub Jelinek <jakub at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |aoliva at gcc dot gnu.org



--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-06 
09:15:24 UTC ---

-g3 isn't the right switch for that, that is historically about enabling

.debug_macinfo/.debug_macro.  We have various -feliminate-unused-debug*

options.

But generally, we try to emit (for -fvar-tracking-assignments) debug info even

for unused automatic vars, I don't see why file scope vars should be any

different.  Perhaps we can add some --param how large initializers we want to

accept, with some sensible default (say 64 bytes?), so that we don't blow the

debug info size with multi-MB initializers, but for reasonably small things we

improve the debug info experience.  I'll implement something without --param

first and see how much it grows debug info on say cc1plus or libstdc++.

Note that we emit debug info for those vars anyway, just don't provide any

DW_AT_location/DW_AT_const_value currently, so ptype works, but print doesn't.

Reply via email to