|
|
- Compile the program gcc -g -o palindrome palindrome.c
- It generates a executable program named palindrome.
- Start the debugger with the name of executable program to be debugged. In our case, command is gdb palindrome
- The debugger out puts its prompt (gdb)
$ gdb palindrome (gdb)
- We keep first break point at the first instruction of the main function, that is the line 7, to stop the execution immediately after started.
(gdb) break main
Breakpoint 1 at 0x80483da: file palindrome.c, line 7.
(gdb)
|
|