Some usefull GCC options for preprocessor

http://sources.redhat.com/gdb/current/onlinedocs/gdb_11.html

We pass the `-gdwarf-2′ and `-g3′

flags to ensure the compiler includes information about preprocessor macro. For example;-

gcc -gdwarf-2 -g3 sample.c -o sample

To print the preprocessor output and stop there :
gcc -E sample.c
Advertisements

About yadab das
Software Developer{writing,debugging,documenting} source code

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: