gdb seg violation during print command (more info)
David Cogen
cogen@ll.mit.edu
Fri May 5 12:49:00 GMT 2000
I just thought of something, and found an answer.
With tteesstt11 declared as
int tteesstt11 (int)
if I do
whatis tteesstt11
I get
type = int (void)
which I believe is wrong. So it is not surprising to me that when I do
print tteesstt11(3)
gdb cannot resolve it.
I then changed the declaration to
int tteesstt11 (int x)
and then when I do
whatis tteesstt11
I get
type = int (int)
which is correct. Now when I do
print tteesstt11(3)
I get 4. Yay!
int tteesstt11 (int)
and
int tteesstt11 (int x)
should be indistinguishable as far as overloading, I believe.
-- DavidC
More information about the Gdb
mailing list