Is there a way to make the GNU C Preprocessor, cpp (or some other tool) list all available macros and their values at a given point in a C file?
I’m looking for system-specific macros while porting a program that’s already unix savvy and loading a sparse bunch of unix system files.
Just wondering if there’s an easier way than going hunting for definitions.
I don’t know about a certain spot in a file, but using:
Dumps all the default ones. Doing the same for a C file with some
#includeand#definelines in it includes all those as well. I guess you could truncate your file to the spot you care about and then do the same?From the man page: