This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: Problem calling functions within gdb (version 7.5)
- From: Saurabh T <saurabh at hotmail dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Thu, 25 Apr 2013 15:45:48 +0000
- Subject: RE: Problem calling functions within gdb (version 7.5)
- References: <DUB123-W3379C1D5569CB0664A9923B1B50 at phx dot gbl>,<87r4hykai1 dot fsf at fleche dot redhat dot com> <DUB123-W1189571D83329779F4BA17B1B60 at phx dot gbl>,<5179472B dot 5020107 at redhat dot com>
----------------------------------------
> Date: Thu, 25 Apr 2013 08:09:31 -0700
> From: keiths@redhat.com
> To: saurabh@hotmail.com
> CC: gdb@sourceware.org
> Subject: Re: Problem calling functions within gdb (version 7.5)
>
> On 04/25/2013 07:24 AM, Saurabh T wrote:
> >> From: tromey@redhat.com
> >>
> >> Saurabh> 1. call fn(3, x)
> >> Saurabh> gdb says: Cannot resolve function fn to any overloaded instance
> >> Saurabh> This used to work with gdb 7.2. The function signature completely
> >> Saurabh> matches the arguments so I dont know what it's complaining about.
> >>
> >> Please file a bug report.
> >
> > Done: http://sourceware.org/bugzilla/show_bug.cgi?id=15398
>
> Thank you. This was introduced in 7.2 with support for ADL. Looks like a
> bug in types_equal, which doesn't account for cv qualifiers.
It was introduced in 7.3. 7.2 works.
>
> >> Saurabh> 2. print k
> >> Saurabh> Let's say this prints 0x7ffb24
> >> Saurabh> call fn2(0x7ffb24)
> >> Saurabh> gdb again says: Cannot resolve function fn2 to any overloaded instance
> >> Saurabh> This also used to work with gdb 7.2. Here I can understand if
> >> Saurabh> promoting ints to arbitrary pointers is no longer supported.
> >>
> >> I was under the impression that we allowed this again, but it fails for
> >> me too. Please file another bug for this one.
> >
> > Done: http://sourceware.org/bugzilla/show_bug.cgi?id=15399
>
> What is "show check type"? If that is enabled/non-zero, gdb will not
> allow this conversion. If you disable it ("set check type 0"), it should
> work:
>
> (gdb) p fn2(0x7fffffffde14)
> Cannot resolve function fn2 to any overloaded instance
> (gdb) set check type 0
This does not work. show check type takes off/on; 0 gives an
error to me. Neither off nor on print the value. Note that you need to
compile with g++. Thanks.