This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcc internals question, e.g. -fdump-translation-unit
- From: Carl Spalletta <cspalletta at gmail dot com>
- To: gcc-help at gnu dot org
- Date: Sun, 5 Feb 2006 14:22:30 -0500
- Subject: gcc internals question, e.g. -fdump-translation-unit
- Reply-to: cspalletta at adelphia dot net
I need a way to extract from gcc, each time gcc runs, the following information:
A) When a call to any function F is encountered, I require the full path of the
file wherein F is defined.
B) When the conversion of any pointer of type STRICT->funcptr (structure
member of type pointer to function(of any return type)) to a function call is
encountered, I require the full pathname of the file wherein STRUCT is defined.
I have looked at things like the -fdump-translation-unit flag, and have
managed to perform task 'A" by laborious parsing and analysis of the output
but I am looking for a simpler way. I can't do "B", at all.
Can I do this by use of some other, or new, or undocumented flag for gcc. If
so, then in particular, how will I interpret the output from that flag?
Or do I need to patch gcc itself? Where would be the right place to start -
what file or function?