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: David Cogen <cogen at ll dot mit dot edu>
- Subject: Re: gdb seg violation during print command (more info)
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Fri, 5 May 2000 12:51:20 -0700 (PDT)
- cc: kettenis at wins dot uva dot nl, gdb at sourceware dot cygnus dot com, cogen at poblano
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
>