From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14899 invoked by alias); 20 Apr 2009 18:27:47 -0000 Received: (qmail 14891 invoked by uid 22791); 20 Apr 2009 18:27:47 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Apr 2009 18:27:42 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3KIPUfw022412; Mon, 20 Apr 2009 14:25:30 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3KIPSUQ025312; Mon, 20 Apr 2009 14:25:28 -0400 Received: from opsy.redhat.com (vpn-12-214.rdu.redhat.com [10.11.12.214]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3KIPRAD008389; Mon, 20 Apr 2009 14:25:28 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id A028437829A; Mon, 20 Apr 2009 12:25:26 -0600 (MDT) To: Jonas Maebe Cc: gdb-patches ml Subject: Re: [patch] Set calling convention of methods References: <7B6EF4DA-76C8-4D9C-8B9F-94153EF1C4E1@elis.ugent.be> From: Tom Tromey Reply-To: Tom Tromey Date: Mon, 20 Apr 2009 18:27:00 -0000 In-Reply-To: <7B6EF4DA-76C8-4D9C-8B9F-94153EF1C4E1@elis.ugent.be> (Jonas Maebe's message of "Mon\, 20 Apr 2009 10\:39\:22 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (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: 2009-04/txt/msg00527.txt.bz2 >>>>> "Jonas" == Jonas Maebe writes: Tom> Yeah, this is a bit gross. AFAICT the calling convention field only Tom> takes values from dwarf. So, I suppose the question is how you plan Tom> to use this information in later patches. If you check the calling Tom> convention in general code then I suppose we will need some generic Tom> set of values here. Jonas> It is already used in general code (well, in non-DWARF-specific code), Jonas> see the use of DW_CC_GNU_renesas_sh in sh-tdep.c Yeah, I saw that. I suspect that this means that the SH maintainer knows that DWARF is the only debug format in use on the SH. "dwarf2.h" is not included in many places in gdb, and not by any header. So, assuming your uses of this field will end up in truly generic code, I think the thing to do is introduce a new enum, and then translate values in the DWARF reader. It is tempting to simply reuse the DWARF enum internally, but I think that goes against the GDB style. Tom