[GRASS5] Re: getting gdb to work
Markus Neteler
neteler at itc.it
Tue Sep 23 05:38:31 EDT 2003
On Tue, Sep 23, 2003 at 07:40:31PM +1200, Hamish wrote:
> > > also in anyone can help, I'm having problems getting gdb to work
> > > with GRASS.
>
> Glynn:
> > 1. Don't use LDFLAGS="-s" if you want to debug the binary; "-s" strips
> > the debugging information.
> >
> > 2. Don't use -O if you want to be able to step through function
> > bodies. When optimisation is enabled, the compiler will re-order
> > statements and re-arrange expressions, resulting in object code which
> > barely resembles the source code.
Added to INSTALL file.
> Bernhard:
> > Run the actual command in etc/bin/cmd or etc/bin/inter not the wrapper
> > from the grass command prompt.
>
See:
documents/debugging.txt
> Thanks a lot for the info, now it works fine.
>
>
> For the archive--
>
> gdb is the GNU (interactive) debugger.
>
> GUI frontends include: ddd, xxgdb, cgdb, kdbg
> quick reference guides:
> http://www.cs.hmc.edu/tech_docs/qref/c++/gdb.html
> http://tiger.la.asu.edu/Quick_Ref/gdb_quickref.pdf
I can highly recommend the graphical debugger 'ddd':
http://www.gnu.org/software/ddd/
You can select a variable with right mouse button and display it etc.
[...]
Markus
More information about the grass-dev
mailing list