From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18548 invoked by alias); 14 May 2010 16:19:32 -0000 Received: (qmail 18530 invoked by uid 22791); 14 May 2010 16:19:29 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 May 2010 16:19:25 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4EGJ7X1022041 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 14 May 2010 12:19:07 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4EGJ5ce008359; Fri, 14 May 2010 12:19:05 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o4EGJ3nI005348; Fri, 14 May 2010 12:19:03 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id DA81137881C; Fri, 14 May 2010 10:19:02 -0600 (MDT) From: Tom Tromey To: Jonas Maebe Cc: FPC Core Developer List , "Pierre Muller" , gdb-patches@sourceware.org Subject: Re: [Core] [RFC] dwarf debug information: Handle Free Pascal virtual table indexes References: <23651.5388860882$1273672053@news.gmane.org> <11064.3996195451$1273708856@news.gmane.org> Reply-To: tromey@redhat.com Date: Fri, 14 May 2010 17:28:00 -0000 In-Reply-To: (Jonas Maebe's message of "Thu, 13 May 2010 23:14:04 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2010-05/txt/msg00302.txt.bz2 >>>>> "Jonas" == Jonas Maebe writes: >> So I guess we can safely try to reuse the existing C++ branch in the >> DWARF reader for the Pascal case. Jonas> I agree. And I assume it is currently not used because we don't Jonas> generate an AT_containing_type attribute (because that's used by Jonas> GDB's DWARF parser to initialise fnp->fcontext). That should not Jonas> be too difficult to add, but I'm not sure what it's doing in the Jonas> debug info as part of a TAG_subprogram. I misread the code a little yesterday -- I didn't notice that the existing code is stripping an initial DW_OP_ref. So I think if FPC emitted correct DWARF, gdb would already handle it. Well, maybe ... there is a "fnp->voffset += 2" in there that I don't understand the rationale for. The AT_containing_type stuff seems to be some historical relic in gcc. The reason it is important now is that it is the way gdb recognizes that it should use a gcc-specific hack. Jonas> As far as I can see, it's only defined by the DWARF3 spec for Jonas> DW_TAG_ptr_to_member_type entries (which are not supported by Jonas> GDB, and I'm not entirely sure about what their purpose is). They are for the C++ pointer-to-member feature. GDB doesn't implement these because GCC doesn't emit them, preferring instead another GCC-specific hack :-(. There is a PR in GCC bugzilla for this too. Tom