[gmx-users] use Xcode to debug Gromacs

Mark Abraham Mark.Abraham at anu.edu.au
Thu Aug 13 02:58:43 CEST 2009


Shuangxing Dai wrote:
> Dear all,   I was trying to use Xcode to debug the file mdrun and hope to
> trace the flow of source file by running a simple case. There is a tutorial
> for using Xcode to debug a package named apbs, which is very like Gromacs,
> here:
> http://www.macresearch.org/tutorial-introducing-xcode-30-organizer
> I
> followed the tutorial and it works well for apbs. But when I did the
> same thing for Gromacs, I can only see the assemble code for mdrun and
> it was not connected to the source code. Only assemble code does not
> help. So my question is:
> anyone know how to use Xcode to debug Gromacs executable file? I need
> the breakpoints to be related with the source code so that I can trace
> the flow.

As I commented in an email to Harold a little while back...

> There is no substitute for getting a debugger and stepping through a run of GROMACS built with CFLAGS=-g to understand the flow of the code.

Symbolic information used by a debugger is added by the compiler and 
linker in response to an explicit request. I cast a quick eye over that 
tutorial, and didn't see it mention this point, so Xcode must be doing 
some magic behind the scenes that doesn't serve to educate the user.

So, setting the CFLAGS environment variable as above, or using

./configure --your-options CFLAGS="-g -anyotheroptions"

will provide the symbolic information.

Mark



More information about the gromacs.org_gmx-users mailing list