From: Saurabh T <saurabh@hotmail.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: RE: Problem calling functions within gdb (version 7.5)
Date: Thu, 25 Apr 2013 15:45:00 -0000 [thread overview]
Message-ID: <DUB123-W41A1167FBF065A8E14CC3B1B60@phx.gbl> (raw)
In-Reply-To: <5179472B.5020107@redhat.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.
From gdb-return-42056-listarch-gdb=sources.redhat.com@sourceware.org Thu Apr 25 16:12:07 2013
Return-Path: <gdb-return-42056-listarch-gdb=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb@sources.redhat.com
Received: (qmail 14513 invoked by alias); 25 Apr 2013 16:12:06 -0000
Mailing-List: contact gdb-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb.sourceware.org>
List-Subscribe: <mailto:gdb-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb/>
List-Post: <mailto:gdb@sourceware.org>
List-Help: <mailto:gdb-help@sourceware.org>, <http://sourceware.org/ml/#faqs>
Sender: gdb-owner@sourceware.org
Delivered-To: mailing list gdb@sourceware.org
Received: (qmail 14503 invoked by uid 89); 25 Apr 2013 16:12:06 -0000
X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1
Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 25 Apr 2013 16:12:05 +0000
Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3PGC4GL019179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits%6 verify=OK); Thu, 25 Apr 2013 12:12:04 -0400
Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3PGC3hh020316 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits%6 verify=NO); Thu, 25 Apr 2013 12:12:03 -0400
Message-ID: <517955D3.4010101@redhat.com>
Date: Thu, 25 Apr 2013 16:12:00 -0000
From: Keith Seitz <keiths@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5
MIME-Version: 1.0
To: Saurabh T <saurabh@hotmail.com>
CC: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Problem calling functions within gdb (version 7.5)
References: <DUB123-W3379C1D5569CB0664A9923B1B50@phx.gbl>,<87r4hykai1.fsf@fleche.redhat.com> <DUB123-W1189571D83329779F4BA17B1B60@phx.gbl>,<5179472B.5020107@redhat.com> <DUB123-W41A1167FBF065A8E14CC3B1B60@phx.gbl>
In-Reply-To: <DUB123-W41A1167FBF065A8E14CC3B1B60@phx.gbl>
Content-Type: text/plain; charset=windows-1251; format=flowed
Content-Transfer-Encoding: 7bit
X-SW-Source: 2013-04/txt/msg00091.txt.bz2
Content-length: 1452
On 04/25/2013 08:45 AM, Saurabh T wrote:
>> 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.
Yes, sorry. My bad.
>> 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.
I am using your example program with G++ 4.7.2 (Fedora 18 system compiler).
Ah, I think I may see the problem. This was fixed /after/ the 7.5 branch
was created, so it doesn't actually appear in an official release yet. I
use CVS HEAD, so I have that patch in my sources.
In that patch, we re-purpose the existing command "set/show check type",
and that is probably why it does nothing for you (because until now, it
never did do anything).
If you grep for "strict" in gdbtypes.c, do you get anything? If not,
your sources do not contain the patch from c++/13356
(http://sourceware.org/bugzilla/show_bug.cgi?id\x13356).
The easiest way to get the patch is to use the git mirror and use commit
e8370ca5. Or I can send it to you privately.
Keith
next prev parent reply other threads:[~2013-04-25 15:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 21:30 Saurabh T
2013-04-25 13:10 ` Phil Muldoon
2013-04-25 13:26 ` Tom Tromey
2013-04-25 13:25 ` Tom Tromey
2013-04-25 14:24 ` Saurabh T
[not found] ` <5179472B.5020107@redhat.com>
2013-04-25 15:45 ` Saurabh T [this message]
[not found] ` <517955D3.4010101@redhat.com>
2013-04-25 16:35 ` Saurabh T
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DUB123-W41A1167FBF065A8E14CC3B1B60@phx.gbl \
--to=saurabh@hotmail.com \
--cc=gdb@sourceware.org \
--cc=keiths@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox