Makefiles, GCC's -ggdb option, and Valgrind
To get right to the point, Valgrind is reporting filenames and line numbers for errors in some files but not others. The makefiles say to include full debugging info in all compilations, so I would expect identical behavior. The only difference is which makefile the instructions come from.
This is the makefile for my library sources; Valgrind doesn't show line numbers for any of these.
Code:
# Makefile
filesystem.o: filesystem.c filesystem.h
gcc -ggdb -ansi -c filesystem.c
filesystem.h: list.h
list.o: list.c list.h
gcc -ggdb -ansi -c list.c
list.h: toolkit.h
toolkit.o: toolkit.c toolkit.h
gcc -ggdb -ansi -c toolkit.c
And these are my project sources; line numbers are shown for all of them. EDIT: Oh, and ../Jesdisciple is my library directory.
Code:
# Makefile
outliner: main.o outline.o ../Jesdisciple/filesystem.o ../Jesdisciple/list.o ../Jesdisciple/toolkit.o
gcc -ggdb -ansi -o outliner main.o outline.o ../Jesdisciple/filesystem.o ../Jesdisciple/list.o ../Jesdisciple/toolkit.o
main.o: main.c outline.c outline.h ../Jesdisciple/filesystem.h
gcc -ggdb -ansi -c main.c outline.c
outline.h: ../Jesdisciple/filesystem.h
include ../Jesdisciple/Makefile
Can anyone please hint at what I did wrong? Thanks!
P.S. Sorry for bumping Enter a little too soon.