This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Getting to the source for a given C++ object


Hi,

I'm currently trying to debug a C++ program that makes heavy use of
templates and derived classes. Is there an easy way to get to the actual
code for a given class pointer?

At the moment if I look at the class pointer it gives me the template
instantiation which I can work it out from but as most of the parameters
are #define's is a rather labour intensive operation.

e.g.

(gdb) p currNode
$8 = (Operation<(ExpressionType)45, 0, 1, RegisterID, (ResultType)2> *)
0x3834a3d0


--
Alex, homepage: http://www.bennee.com/~alex/
Spirtle, n.: The fine stream from a grapefruit that always lands right
in your eye. -- Sniglets, "Rich Hall & Friends"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]