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".

  1. your makefile builds program2, pretends build program (i.e. target on first line wrong).
  2. your clean target should clean *.o, otherwise make clean; make relink program, not recompile objects in it.

one of above factors explanation missing debug symbols you've observed.


Comments

Popular posts from this blog

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -