This is the mail archive of the gdb@sources.redhat.com 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]

Re: *****SPAM***** casting in gdb


On Friday, December 13, 2002, at 01:28  AM, Jacques Le Normand wrote:

how do you get gdb to cast to size_t?
I realize that size_t is a typedef to unsigned long long or somesuch.
A little background:
when I'm debugging my vector<int> v, gdb won't let me type v[0], instead =
it says this: "One of the arguments you tried to pass to operator[] =
could not be converted to what the funtion wants."
I then looked up what operator[] took in the sgi docs and it said a =
size_t. Anyone have any ideas?
(I realize I can do p *(v._M_start+n) , but having a method for casting =
would help me later on)
--Jacques

While this doesn't help *you*, it should help the current C++ people for GDB:
I've seen this with STABS debugging info when some of the operator functions were left out of the debugging info, but others weren't (GCC + STABS will omit unused functions from debug info), and we ommitted the operator we really need to use, and in some cases when we parsed the types of the arguments out of the demangled function name and come up with some weird type.







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