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]

Re: C++, "too few arguments in function call" error?



On Mar 17, 2006, at 6:03 AM, Dave Korn wrote:
On 17 March 2006 03:57, rob@encodia.biz wrote:

(gdb) p set1.begin() too few arguments in function call

This is a total shot in the dark, but maybe something's gone wrong and it's
expecting you to pass the this pointer as an explicit first argument rather
than an implicit one?

That does work sometimes. But if the class is a template, or if the method is overloaded, I can't do it, or I have to type way too much, or I get this <incomplete type> error. Examples...


(gdb) p set1.begin(&set1)
Cannot resolve method set<xml::XmlNode*,std::less<xml::XmlNode*>,std::allocator<xml::XmlNode*> >::begin to any overloaded instance
(gdb) p set<xml::XmlNode*, std::less<xml::XmlNode*>, std::allocator<xml::XmlNode*> >::begin(&set1)
$1 = {
_M_node = 0x3008c0
}


That works, but it's horrible.

(gdb) p set<xml::XmlNode*, std::less<xml::XmlNode*>, std::allocator<xml::XmlNode*> >::size(&set1)
$8 = <incomplete type>
(gdb) p (int)(set<xml::XmlNode*, std::less<xml::XmlNode*>, std::allocator<xml::XmlNode*> >::size(&set1))
Invalid cast.


I can't get the size(), bu it's similar to begin() -- both are inline, both return types that are typedef'd in the same place.


(gdb) p vector<xml::Step*, std::allocator<xml::Step*> >::begin(&steps) non-unique member `begin' requires type instantiation

?

Rob


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