From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28248 invoked by alias); 12 Jan 2007 23:08:12 -0000 Received: (qmail 28235 invoked by uid 22791); 12 Jan 2007 23:08:12 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 12 Jan 2007 23:08:06 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H5VVD-0001vJ-RA; Fri, 12 Jan 2007 18:08:03 -0500 Date: Fri, 12 Jan 2007 23:08:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: [ob] Adjust member pointer test for g++ 3.3 Message-ID: <20070112230803.GB7039@nevyn.them.org> Mail-Followup-To: Mark Kettenis , gdb-patches@sourceware.org References: <20070112201706.GA2673@nevyn.them.org> <200701122150.l0CLoRue029795@brahms.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200701122150.l0CLoRue029795@brahms.sibelius.xs4all.nl> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00325.txt.bz2 On Fri, Jan 12, 2007 at 10:50:27PM +0100, Mark Kettenis wrote: > The test now runs for me, but I get quite a few errors. Here's the > resulting bit from gdb.log. Can you spot what's going wromg here? > Should we XFAIL this test for GCC 3.3? That depends how we got to some of these bogus conclusions. I filed a GCC bug for the lousy debug info it emits for member pointers; until that's fixed, though, I added a workaround in dwarf2read.c. If there's an easy way to extend that to match this too, then it may be helpful to do so. Do OpenBSD 3.x toolchains use dwarf2? Or is this out in stabs land? > ptype pmi > type = int A::** > (gdb) FAIL: gdb.cp/member-ptr.exp: ptype pmi (A::j) It should be "int A::*". Somehow we think we have a pointer to a member pointer, instead of just a member pointer. That explains most of the cascading failures for pmi. > print a.*pmf > $9 = {int (A *, int)} 0x1c000af6 > (gdb) PASS: gdb.cp/member-ptr.exp: print a.*pmf We get this right... > print (a.*pmf)(3) > $11 = 127 > (gdb) FAIL: gdb.cp/member-ptr.exp: print (a.*pmf)(3) So I'm pretty surprised that we get this wrong. We've somehow called the wrong function, or called it with a bogus argument / "this" pointer. All the failures except for this one are caused by the strange type of pointers to data members. -- Daniel Jacobowitz CodeSourcery