From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24497 invoked by alias); 25 Apr 2013 15:45:52 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 24487 invoked by uid 89); 25 Apr 2013 15:45:52 -0000 X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from dub0-omc3-s25.dub0.hotmail.com (HELO dub0-omc3-s25.dub0.hotmail.com) (157.55.2.34) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 25 Apr 2013 15:45:51 +0000 Received: from DUB123-W4 ([157.55.2.9]) by dub0-omc3-s25.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 25 Apr 2013 08:45:48 -0700 X-EIP: [Iwi3+e6HS+HRmYlSksHeh6EZCVTi1oSa] Message-ID: From: Saurabh T To: Keith Seitz CC: "gdb@sourceware.org" Subject: RE: Problem calling functions within gdb (version 7.5) Date: Thu, 25 Apr 2013 15:45:00 -0000 In-Reply-To: <5179472B.5020107@redhat.com> References: ,<87r4hykai1.fsf@fleche.redhat.com> ,<5179472B.5020107@redhat.com> Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg00090.txt.bz2 ---------------------------------------- > 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 instan= ce > >> Saurabh> This used to work with gdb 7.2. The function signature comple= tely > >> Saurabh> matches the arguments so I dont know what it's complaining ab= out. > >> > >> Please file a bug report. > > > > Done: http://sourceware.org/bugzilla/show_bug.cgi?id=3D15398 > > 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=3D15399 > > 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=20 error to me. Neither off nor on print the value. Note that you need to=20 compile with g++. Thanks.=20=09=09=20=09=20=20=20=09=09=20=20 >From gdb-return-42056-listarch-gdb=sources.redhat.com@sourceware.org Thu Apr 25 16:12:07 2013 Return-Path: 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: List-Subscribe: List-Archive: List-Post: List-Help: , 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=256 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=256 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 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 CC: "gdb@sourceware.org" Subject: Re: Problem calling functions within gdb (version 7.5) References: ,<87r4hykai1.fsf@fleche.redhat.com> ,<5179472B.5020107@redhat.com> In-Reply-To: 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=13356). 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