GnuDeveloper.com

Debug C program Line By line

Hi,
Compile C program with -g option as
gcc -g test.c

gdb ./a.out

b 1 => set break point at line no 1
b main => set break point at main function
next => run the program line by line