- Compile the program with the -g option, this causes the compiler to generate an augmented symbol table.
- $gdb [program] [core-dump]
- gdb options:
-d dir
Tell gdb to look in dir for source files. Ex: gdb –d /work/phase1 –d /work/phase2 foo.
-d dir
Tell gdb to look in dir for source files. Ex: gdb –d /work/phase1 –d /work/phase2 foo.
# A very simple makefile.
# Lines beginning with # are comments.
# Targets begin at the left margin, followed by : .