This is the mail archive of the gcc-patches@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: Type representation in CTF and DWARF


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


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