This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: gdb seg violation during print command (more info)
- To: dan at cgsoftware dot com
- Subject: Re: gdb seg violation during print command (more info)
- From: David Cogen <cogen at ll dot mit dot edu>
- Date: Fri, 5 May 2000 15:29:03 -0400 (EDT)
- CC: dan at cgsoftware dot com, kettenis at wins dot uva dot nl, gdb at sourceware dot cygnus dot com, cogen at poblano
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