Re: 2nd try GDB and c++ template class
Re: 2nd try GDB and c++ template class
- Subject: Re: 2nd try GDB and c++ template class
- From: Wade Tregaskis <email@hidden>
- Date: Thu, 4 Nov 2004 18:44:31 +1100
The problem that i have is that if the class get
template(template<class T>) I can't follow the pointer any more. The
little arrow does not appear anymore and it just show me the hex
value of the pointer. It also classified the type as a struct, for
example; if the class is not template the arrow appear and the type
is Node *, in the other hand, if the class is template, the arrow
disappear, I get just the hex value of the pointer and the type
change to struct Node<int> *
This appears to be a limitation/bug of gdb - I've had the same problem
on various versions of gcc 3.x on various platforms... there's no
solution that I know of; I usually find a better way to debug* or use
examine ('x') to look at the raw data (if possible).
Gdb is very bad at most C++ stuff, particularly anything that involves
templates. I don't know of any alternative, unfortunately. I usually
just put a lot of debugging stuff into my code... invariably that saves
me most of the pain of having to work with gdb, and usually gets things
solved faster (since it's a more pre-emptive sort of debugging, so you
usually can collect a lot more runtime information prior to whatever
point you're at).
Wade Tregaskis (AIM, Yahoo & Skype: wadetregaskis, ICQ: 40056898, MSN &
email: email@hidden, Jabber:
email@hidden
-- Sed quis custodiet ipsos custodes?
* = Even though XCode uses gdb, it still manages to do a lot of things
gdb apparently can't... I think it must do a fair bit of work itself in
addition to whatever gdb does, particularly regarding ObjC stuff.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden