yum install gcc-c++
g++ -o main -O0 main.c -g
intrusive way:
#define Debug 1 #if Debug printf(); fflush(); #endif
gdb way: