This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gdb seg violation during print command (more info)


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
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]