[vtkusers] debugging vkt source

David Gobbi dgobbi at irus.rri.on.ca
Sun Oct 8 13:28:10 EDT 2000


On Sun, 8 Oct 2000, Wolfram H Volpi wrote:

> Is there a debugger to trace a vtk C++ function when it is called from a 
> tcl script?

With gcc and gdb, at least, all you have to do is run the 'vtk' executable
from within the debugger.  I do this all the time, both with tcl and
python.  
 
> I would like to run the tcl script and then step into the C++
> function.

With gdb, you do

gdb /usr/local/bin/vtk   <or wherever vtk is>

then

run <name-of-tcl-script>

The easiest thing to do with an infinite loop is just <Control-C>
followed by a stack trace (i.e. the 'bt' command).  You can also
set breakpoints in the C++ code, though there are a couple extra
gdb commands required to tell gdb where the .so files are.

Unfortunately, I don't have much experience with any debuggers
except for gdb.

 - David

--
  David Gobbi, MSc                    dgobbi at irus.rri.on.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario






More information about the vtkusers mailing list