"Cannot resolve method ex::dbgprint to any overloaded instance" on gdb 4.18

Richard B. Kreckel kreckel at ThEP.Physik.Uni-Mainz.DE
Sat Feb 5 18:53:33 CET 2000


Hi,

Upon multiple request I had a quick look at the subject-mentioned problem
that rendered the not-so-useless method dgbprint [1] unavailable.  There
is nothing to overload here (its argument being void anyhow) so this was
kind of obscure.  There seems to be a bug introduced in gdb 4.18 and it
may already be fixed in the current CVS tree, since Daniel Berlin claims
he fixed it a couple of days ago (on the gdb mailing list):

> 2. gdb is screwing up the function ranking. Right in the comments it 
> says that nargs includes the this pointer in it's count, and nparams 
> doesn't, but it doesn't take this into account.  So i made it take it 
> into account, and all of the sudden, it could resolve overloads 
> properly in most cases.
> I can succesfully do a print AnSTLVector.begin() and AnSTLVector[0], 
> and if AnSTLVector was a vector of strings, I could do *
> (AnSTLVector.begin()).length(), and get the right answer. 

In the meantime, you may simply tell your debugger to 
(gdb) set overload-resolution off
and you can again build any ex foo and call foo.dbgprint() to display the
contents.

Those using DDD 3.2 may also set this in Edit->Preferences and save
options.

HTH
   -rbk.

[1] The method dbgprint(void) is a small wrapper around print(ostream &,
    unsigned) used for debugging, where cout may not be present.
-- 
Richard Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>





More information about the GiNaC-devel mailing list