I am trying to generate various functions using macros in C. Is there any way for me to see all the functions generated during compilation?
Find all functions generated by macros
120 views Asked by ekhan At
3
There are 3 answers
0
On
If you are using gcc, the option -save-temps saves the intermediate steps of compilation (preprocessed files and assembly code) while generating binary.
You can see a brief description here.
0
On
You could use nm
on the object file to get the name of public (non static
) functions.
You could pass the -v
option to the cc1
to get the the name of compiled functions.
You could also extend your recent GCC compiler using MELT
And of course, you could get the preprocessed form, as other answers suggested.
You can use -E option of the gcc compiler to view the preprocessed file.