Compile the program with the -g option, this causes the compiler to generate an augmented symbol table.$gdb [program] [core-dump]gdb options:
- 1月 08 週二 200813:04
gdb
- 9月 08 週六 200720:40
Basic Introduction - make
By default, make looks first for a makefile named makefile, then it looks for Makefile.A simple example: two targets, stimulate and stimulate.db# A very simple makefile.
# Lines beginning with # are comments.
# Targets begin at the left margin, followed by : .
# Shell command lines must begin with a tab.
simulate:
# Shell commands to create stimulate
gcc -o stimulate -O stimulate.c inputs.c outputs.c
stimulate.db:
# Shell commands to create stimulate.db
gcc -DDEBUG -g -o stimulate.db stimulate.c inputs.c outputs.c
# Lines beginning with # are comments.
# Targets begin at the left margin, followed by : .
# Shell command lines must begin with a tab.
simulate:
# Shell commands to create stimulate
gcc -o stimulate -O stimulate.c inputs.c outputs.c
stimulate.db:
# Shell commands to create stimulate.db
gcc -DDEBUG -g -o stimulate.db stimulate.c inputs.c outputs.c
1
