Reputation: 3412
I have a program that now is throwing a Segmentation fault
error message when I execute it, but I do not know in which line is breaking.
My program use Makefile.am
files to build it.
Where can I set debug flags to compile (i.e. -g
flag) in this autotools
files.
Upvotes: 0
Views: 1520
Reputation: 16315
It depends. If your program is built using the C compiler, you need something like
./configure CFLAGS="-g" ...
If it was built with the C++ compiler you need something like
./configure CXXFLAGS="-g" ...
If you're using libtool to link the program doing something like:
./libtool --mode=execute gdb ./program
will start gdb
.
Upvotes: 2