On Sat, Aug 4, 2012 at 1:10 PM, Marcelo Zimbres <mzimb...@gmail.com> wrote: > Hi, > > I am having some trouble to debug programs built from autotools. I am > following the steps: > > $ ./configure CXXFLAGS="-g -O0" > $ make > $ libtool --mode=execute gdb --arg ./swat_find arg_list > > When I run the last line, I get the error message: > > Reading symbols from > /home/marcelo/Public/swat/debug/.libs/lt-swat_find...(no debugging symbols > found)...done. > > Why there are no symbols? The output of make shows the flags have been > passed to gcc, for example: > > libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/root > -I/usr/local/include/root -I -I -g -O0 -MT libswat_la-TDKernel.lo -MD -MP > -MF .deps/libswat_la-TDKernel.Tpo -c ../TDKernel.cxx -o > libswat_la-TDKernel.o >/dev/null 2>&1 > > I couldn't also find the -s option which would discard the symbols. Can > someone help me? A couple of thoughts....
(1) -g3 -ggdb will likely give you the most debugging information. For example, at -g3 symbolic constants are available (ie, #define FOOBAR 3). I don't think -ggdb gets you anything special, but it might in the future. (2) What is your link command? Was -S or --strip-debug used? (3) Did you happen to run strip after the binary was output? Jeff