[vtkusers] debugging vkt source
Amy Henderson
amy.henderson at kitware.com
Mon Oct 9 08:47:33 EDT 2000
At 01:28 PM 10/8/2000 -0400, David Gobbi wrote:
>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.
You can also do this in the debugger in Visual C++. Open the workspace for
vtk (c:\vtkbin\Debug\makefile1, for example). Go to Project | Settings,
and click on the Debug tab. Set the "working directory" to whatever
directory your tcl script is in, and set "program arguments" to the
filename of your tcl script. You'll also need to set breakpoints in the
C++ code in the functions you're wanting to look at. Then run (F5) in the
debugger.
Amy
>
> > 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
>
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list