What is wrt c ++ debug mode?

From here: http://google-glog.googlecode.com/svn/trunk/doc/glog.html

Debug mode support
Special debug mode logging macros affect only debug mode and are not compiled for compilation in non-debug mode.

What does "debug mode" mean wrt c ++ program?

Is it possible to say that the program is in debug mode when we use GDB?

+3
source share
3 answers

There are three sides to the "debug mode."

( ) ( , , ), . / , .

. , , , . , .

- " ". , . .

" " . ( ) , / , .

++ ( C). .

+5

" " , NDEBUG. , ( ):

DFATAL FATAL (.. NDEBUG), , ERROR.

+5

++ (, C) , , .

- NDEBUG, , , , . ( PRODUCTION, , , , .)

NDEBUG . <cassert>, <assert.h> C. , assert no-op, ++ .

, g++ -DNDEBUG myProg.cpp -o myProg , .

Please note that this is different from creating symbolic debugger support, which is controlled using -gGCC or other flags for other platforms.

+4
source

All Articles