gdb seg violation during print command (more info)
Daniel Berlin
dan@cgsoftware.com
Fri May 5 12:51:00 GMT 2000
They are, we ignore the argument names completely.
Which is why i claim it's not gdb's fault.
It's the compiler telling gdb it's an int (void), not gdb.
--Dan
On Fri, 5 May 2000, David Cogen wrote:
> 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