From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6081 invoked by alias); 9 Nov 2004 22:10:35 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6050 invoked from network); 9 Nov 2004 22:10:31 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 9 Nov 2004 22:10:31 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CReC2-0002yb-UJ; Tue, 09 Nov 2004 17:10:27 -0500 Date: Wed, 10 Nov 2004 03:24:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb@sources.redhat.com Subject: Re: METHOD_PTR_*? Message-ID: <20041109221026.GA10905@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb@sources.redhat.com References: <41912F1E.2000606@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41912F1E.2000606@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-11/txt/msg00091.txt.bz2 On Tue, Nov 09, 2004 at 03:57:02PM -0500, Andrew Cagney wrote: > Hello, > > From value.h: > > /* Pointer to member function. Depends on compiler implementation. */ > > #define METHOD_PTR_IS_VIRTUAL(ADDR) ((ADDR) & 0x80000000) > #define METHOD_PTR_FROM_VOFFSET(OFFSET) (0x80000000 + (OFFSET)) > #define METHOD_PTR_TO_VOFFSET(ADDR) (~0x80000000 & (ADDR)) > > It also depends on the underlying architecture - not very 64-bit > friendly :-/ Yuck! If I'm reading this right, it corresponded to some old compiler's implementation. But nowadays we fake it in value_struct_elt_for_reference. This is a bit tricky to untangle, but I think this could be solved entirely in eval.c (and the one place we print "virtual" and ditching the remaining bits. I wonder if anything in the testsuite exercises this? -- Daniel Jacobowitz