[gmx-developers] Debugging using gdb

Shachi Katira shachikatira at gmail.com
Sat Sep 24 01:43:43 CEST 2011


Dear GROMACS developers,

I'm trying to modify the pull code and have encountered a segmentation fault
in the process. I need some help running GROMACS with gdb. When I execute
mdrun with gdb, on using 'backtrace' I get

(gdb) backtrace full
#0  _nb_kernel030_x86_64_sse2.nb030_unroll_loop () at
nb_kernel030_x86_64_sse2.s:329
No locals.
#1  0x3fdbf7e25d753ea9 in ?? ()
No symbol table info available.
#2  0x3fdbf7e25d753ea9 in ?? ()
No symbol table info available.
#3  0x3fda979e858aa137 in ?? ()
No symbol table info available.
#4  0x3fda979e858aa137 in ?? ()
No symbol table info available.
#5  0x40160678c8dd1923 in ?? ()
No symbol table info available.
#6  0x40160678c8dd1923 in ?? ()
No symbol table info available.
#7  0x4092e38cfdd6e1f8 in ?? ()
No symbol table info available.
#8  0x3fea3c3849a97e50 in ?? ()
No symbol table info available.
#9  0xc0c168adf977afb2 in ?? ()
No symbol table info available.
#10 0xbfa833e2faac1228 in ?? ()
No symbol table info available.
#11 0x407e54df4b25981d in ?? ()
No symbol table info available.
#12 0xbff026a42edd354c in ?? ()
No symbol table info available.
#13 0x4000000000000000 in ?? ()
No symbol table info available.
#14 0x4000000000000000 in ?? ()
No symbol table info available.
#15 0x409f400000000000 in ?? ()
No symbol table info available.
#16 0x409f400000000000 in ?? ()
No symbol table info available.
#17 0x3fcb98201cd5f99c in ?? ()
No symbol table info available.
#18 0x0000000000000000 in ?? ()
No symbol table info available.


Is it possible to obtain more information from backtrace? Are the libraries
being stripped?

Details:
I compiled the modified code using
> ./configure CC=gcc --prefix=/home/shachi/gromacs-4.5.1.o --enable-double
--with-fft=fftw3 --without-x --enable-debug --program-suffix=_p
> export CFLAGS=-g (even though --enable-debug should already add this)
> make
>make install

Additionally, I modified the configure script to remove all '-O2' and '-O3'
flags so that gdb doesn't get confused.

I invoked gdb using
> gdb --args mdrun_p -s holer1k1beta1.tpr -v



Thanks.

--Shachi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20110923/e2abb59c/attachment.html>


More information about the gromacs.org_gmx-developers mailing list