how to run only when debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I am looking for an ANSI C preprocessor directive that can make code
run only when I am in debugging mode (compiled with gcc -g option), I
found something like:

#if DEBUG
				Do this in debug;
#else
				do this optionaly if not in debug
#endif


but it didn't work, as DEBUG is not defined,

I appreciate your help, and thank you in advance for that,


-- 
Kind Regards,

Manal

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux