PDA

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



amazingjxq
March 1st, 2008, 06: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, 06:53 AM
gcc -g -o xxx xxx.c

or rather


gcc -ggdb -o xxx xxx.c

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