From: rob@encodia.biz
To: gdb@sources.redhat.com
Subject: Re: C++, "too few arguments in function call" error?
Date: Fri, 17 Mar 2006 19:06:00 -0000 [thread overview]
Message-ID: <51002867-92EF-4D41-BB5A-9EE2EB2C5FB4@encodia.biz> (raw)
In-Reply-To: <006d01c649b2$6171c490$a501a8c0@CAM.ARTIMI.COM>
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
next prev parent reply other threads:[~2006-03-17 18:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-17 7:07 rob
2006-03-17 11:37 ` Dave Korn
2006-03-17 18:36 ` Daniel Jacobowitz
2006-03-17 22:02 ` rob
2006-03-17 19:06 ` rob [this message]
2006-03-18 10:18 ` Dave Korn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51002867-92EF-4D41-BB5A-9EE2EB2C5FB4@encodia.biz \
--to=rob@encodia.biz \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox