Hi all,
is there a way how to debug C part of NVIZ (or other hybrid app like
v.digit) using gdb (e.g. from emacs)? I have taken a look at
doc/debugging.txt, but I didn't find way how to debug these programs.
Thanks in advance. Martin
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
Hi,
thanks Markus, next time I will spend more time searching ML:-) Sorry
for noise here.
Martin
2008/5/29 Markus Neteler <neteler@osgeo.org>:
On Thu, May 29, 2008 at 2:57 PM, Martin Landa <landa.martin@gmail.com> wrote:
I have found this:
On Thu, Mar 27, 2008 at 7:02 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:
...
Once NVIZ is running, get its PID, then:
$ gdb $GISBASE/etc/nviz2.2/nviz
> attach <pid>
> break Create_OS_Ctx
> cont
Selecting the menu option will re-enter the debugger. Single-step
through the function (with "next"), printing out the values of any
variables as they are assigned.
Not sure if helpful...
markus
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
Martin Landa wrote:
is there a way how to debug C part of NVIZ (or other hybrid app like
v.digit) using gdb (e.g. from emacs)? I have taken a look at
doc/debugging.txt, but I didn't find way how to debug these programs.
You can't invoke gdb directly on "nviz" or $GISBASE/bin/nviz, as that
is a shell script. But it's a trivial script which essentially just does:
$GISBASE/etc/nviz2.2/nviz -f $GISBASE/etc/nviz2.2/scripts/nviz2.2_script ${1+"$@"}
You can debug the $GISBASE/etc/nviz2.2/nviz binary as with any other
program, i.e.:
$ gdb $GISBASE/etc/nviz2.2/nviz
> run -f $GISBASE/etc/nviz2.2/scripts/nviz2.2_script <any args>
Or, if you don't need to debug the startup, you can start NVIZ then
"attach" to the process, as suggested by Markus.
--
Glynn Clements <glynn@gclements.plus.com>
Hi,
You can't invoke gdb directly on "nviz" or $GISBASE/bin/nviz, as that
is a shell script. But it's a trivial script which essentially just does:
$GISBASE/etc/nviz2.2/nviz -f $GISBASE/etc/nviz2.2/scripts/nviz2.2_script ${1+"$@"}
You can debug the $GISBASE/etc/nviz2.2/nviz binary as with any other
program, i.e.:
$ gdb $GISBASE/etc/nviz2.2/nviz
> run -f $GISBASE/etc/nviz2.2/scripts/nviz2.2_script <any args>
Or, if you don't need to debug the startup, you can start NVIZ then
"attach" to the process, as suggested by Markus.
thanks Glynn, I have updated doc/debugging.txt accordingly.
Martin
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *