This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
force scanning of includes?
- From: tom fogal <tfogal at apollo dot sr dot unh dot edu>
- To: gdb at sources dot redhat dot com
- Date: Mon, 08 Aug 2005 13:12:30 -0400
- Subject: force scanning of includes?
- Reply-to: tfogal at apollo dot sr dot unh dot edu
This is probably in the docs somewhere, but my greps are coming up
empty. sorry.
I'm trying to debug a C++ program, and gdb doesn't seem to know about
objects defined in a library. The library is built with -g and
installed in /usr/local/lib/vtk, which is listed in /etc/ld.so.conf.
The headers are in /usr/local/include/vtk.
When I try to print an instance of an object from the library, gdb
thinks it is a struct:
#10 0x000000000040825c in main (argc=1, argv=0x7fffffffe748) at test.cxx:60
60 Renderer->Delete();
(gdb) print Renderer
$1 = (struct vtkRenderer *) 0x52d5b0
(gdb) print *Renderer
$2 = <incomplete type>
How can I tell gdb to scan /usr/local/include/vtk/vtkRenderer.h, so it
will know what a vtkRenderer is? The 'directories' command doesn't seem
to be much use here.
I've tried compiling my test.cxx program with '-g' and later '-gdwarf-2
-g3' after reading through some archives.
Thanks,
-tom