PDA

View Full Version : How to compile C program using GCC so that I can use GDB?


amazingjxq
March 1st, 2008, 01:41 AM
I just know this: gcc -o xxx xxx.c
But it seems that something is wrong when I debugging it.

loell
March 1st, 2008, 01:53 AM
gcc -g -o xxx xxx.c

or rather

gcc -ggdb -o xxx xxx.c

amazingjxq
March 1st, 2008, 02:03 AM
OK,thx!