This is the mail archive of the
mailing list for the GDB project.
Re: "too few arguments in function call"
- From: Andreas Schwab <schwab at suse dot de>
- To: André Pönitz <apoenitz at trolltech dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 05 Aug 2008 10:09:33 +0200
- Subject: Re: "too few arguments in function call"
- References: <email@example.com>
André Pönitz <firstname.lastname@example.org> writes:
> However, if I do something like gdb ./myapp-with-all-plugins I get
> (gdb) p "xxx"
> too few arguments in function call
When gdb processes a string in an expression it allocates space in the
inferior by calling malloc and copying the string contents into this
space. Apparently gdb gets confused when it looks up the address of the
> When this message is issued in infcall.c, nargs is always 1, and
> TYPE_NFIELDS (ftype) is 2, independently of the arity of the called
> function, so it really seems to involve the 'string literal conversion'
> (or parsing, or whatever gdb does at that point).
What does `info function malloc' show?
Andreas Schwab, SuSE Labs, email@example.com
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."