gcc - Not getting debugging symbols to be generated -
i using make , debugging symbols not getting generated. here makefile:
program: ui.o data.o string.o c99 -ggdb -o program2 ui.o data.o string.o clean : rm -f program2 ui.o : ui.c data.h c99 -ggdb -c ui.c data.o : data.c data.h c99 -ggdb -c data.c string.o : string.c string.h c99 -ggdb -c string.c
how can generate debugging symbols? when run gdb using gdb program2
gives warning "no debugging symbols found".
- your
makefile
buildsprogram2
, pretends buildprogram
(i.e. target on first line wrong). - your
clean
target should clean*.o
, otherwisemake clean; make
relinkprogram
, not recompile objects in it.
one of above factors explanation missing debug symbols you've observed.
Comments
Post a Comment