[gmx-developers] Debugging using gdb
Mark Abraham
Mark.Abraham at anu.edu.au
Sat Sep 24 02:51:45 CEST 2011
On 24/09/2011 9:43 AM, Shachi Katira wrote:
> 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?
Yes. Not by GROMACS.
>
> 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)
--enable-debug doesn't do anything AFAICR. Neither does make look at
environment variables. Set your CFLAGS before configure, and this should
work. You will see the -g flag in the make output when it calls the
compiler, if things are working right.
> > make
> >make install
>
> Additionally, I modified the configure script to remove all '-O2' and
> '-O3' flags so that gdb doesn't get confused.
Also wise.
Mark
>
> 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/20110924/6668795c/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list