On Wed, Oct 09, 2019 at 09:41:09AM +0200, Richard Biener wrote: > There's a mechanism to get type (and decl - I suppose CTF also > contains debug info > for function declarations not only its type?) info as part of early > debug generation. > The attached "hack" simply mangles dwarf2out to output this early info as the > only debug info (only verified on a small .c file). We still have things like > file, line and column numbers for entities (not sure if CTF has those). > > It should be possible to "hide" the hack behind a -gdwarf-like-ctf or similar. > I guess -g0.5 isn't desirable and we've taken both -g0 and -g1 already... > (and -g1 doesn't include types but just decls).
Yeah. And if location info isn't in CTF, you can as well add an early return in add_src_coords_attributes, like it has one for UNKNOWN_LOCATION already. Or if it is there, but just file/line and not column, you can use -gno-column-info. As has been mentioned earlier, you can use dwz utility post-linking instead of -fdebug-types-section. Jakub