From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12215 invoked by alias); 30 Sep 2011 14:42:45 -0000 Received: (qmail 12206 invoked by uid 22791); 30 Sep 2011 14:42:43 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ey0-f169.google.com (HELO mail-ey0-f169.google.com) (209.85.215.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Sep 2011 14:42:26 +0000 Received: by eye13 with SMTP id 13so1340617eye.0 for ; Fri, 30 Sep 2011 07:42:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.14.10.208 with SMTP id 56mr4198053eev.125.1317393744891; Fri, 30 Sep 2011 07:42:24 -0700 (PDT) Received: by 10.14.127.137 with HTTP; Fri, 30 Sep 2011 07:42:24 -0700 (PDT) In-Reply-To: <1317135598.27942.29.camel@feddie.cnoc.lan> References: <1317055596.23338.12.camel@feddie.cnoc.lan> <1317070857.17681.11.camel@feddie.cnoc.lan> <1317135598.27942.29.camel@feddie.cnoc.lan> Date: Fri, 30 Sep 2011 14:42:00 -0000 Message-ID: Subject: Re: Handling of c++ function members From: Daniel Jacobowitz To: Joost van der Sluis Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes 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 X-SW-Source: 2011-09/txt/msg00139.txt.bz2 On Tue, Sep 27, 2011 at 10:59 AM, Joost van der Sluis wrote: >> What I understood is, that DW_AT_vtable_elem_location should contain a >> Dwarf-block that calculates the location of a pointer in which the >> location of the function member is stored. Your final conclusion is right - I thought the workaround was contained to the dwarf reader, but maybe not. Are you actually passing through gnu-v2-abi.c? Everythong ought to be on the v3 abi unless this is another FPC quirk... >> And there are two thing's I'm not sure about: gcc stores >> DW_AT_containing_type in the debug-info, with the 'parent' entry of the >> DW_TAG_subprogram entry. To me it looks that this is duplicated >> information, and not specified in the Dwarf-specs. Secondly I do not >> understand where the DW_AT_object_pointer is used for? > > DW_AT_containing_type is placed into NFN's Context field by dwarf2read. The use of DW_AT_containing_type by GCC is non-standard, yes. DW_AT_object_pointer is supposed to be used to identify "this" explicitly, I think, but it's been a while. Without it, you can't 100% differentiate "int x()" from "static int x(X *this)" in the debugger. Fortunately we get it right in practice. -- Thanks, Daniel