From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14509 invoked by alias); 14 Dec 2004 15:53:30 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14463 invoked from network); 14 Dec 2004 15:53:23 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 14 Dec 2004 15:53:23 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iBEFrNSl025005 for ; Tue, 14 Dec 2004 10:53:23 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iBEFrLr17878 for ; Tue, 14 Dec 2004 10:53:22 -0500 Received: from cygbert.vinschen.de (vpn50-57.rdu.redhat.com [172.16.50.57]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id iBEFrF4a014738 for ; Tue, 14 Dec 2004 10:53:17 -0500 Received: by cygbert.vinschen.de (Postfix, from userid 500) id EA7E658092; Tue, 14 Dec 2004 16:55:16 +0100 (CET) Date: Tue, 14 Dec 2004 16:36:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: Re: [RFA] Add parse_dwarf2_calling_convention functionality Message-ID: <20041214155516.GB4226@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com References: <20041007095401.GN6702@cygbert.vinschen.de> <20041008124826.GZ6702@cygbert.vinschen.de> <16760.31952.258767.923659@localhost.redhat.com> <417D85E8.7000805@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <417D85E8.7000805@gnu.org> User-Agent: Mutt/1.4.2i X-SW-Source: 2004-12/txt/msg00372.txt.bz2 Hi, On Oct 25 19:02, Andrew Cagney wrote: > Elena Zannoni wrote: > >Corinna Vinschen writes: > > > * gdbarch.sh (parse_dwarf2_calling_convention): New method. > > > * gdbarch.h, gdbarch.c: Re-generate. > > > * arch-utils.c (default_parse_dwarf2_calling_convention): New > > function. > > > * arch-utils.h (default_parse_dwarf2_calling_convention): New extern > > > declaration. > > > * dwarf2read.c (read_subroutine_type): Evaluate > > > DW_AT_calling_convention attribute and call > > > gdbarch_parse_dwarf2_calling_convention appropriately. > > > > > >The dwarf2read.c part is approved if the rest gets approved. > > One mod, rather than adding this: > > >+# Evaluate DW_AT_calling_convention value and convert in a > >calling_convention > >+# value in the functions main type. > >+m::void:parse_dwarf2_calling_convention:int has_attr, unsigned long > >attr_val, unsigned char gcc_compiled, struct type *func_type:has_attr, > >attr_val, gcc_compiled, > >func_type:0:default_parse_dwarf2_calling_convention::0 > > to the architecture vector, take a look at: > > 13.2 Per-architecture module data > http://sources.redhat.com/gdb/current/onlinedocs/gdbint_13.html#SEC114 > > it lets dwarf2 locally manage that method while still being > per-architecture. I'm scratching my head how that's supposed to work. There's no architecture specific data, just an architecture specific function which has to be called for each function in the object file. Are you suggesting that the architecture (SH for now) stores a function pointer in per-arch module data created by _initialize_dwarf2_read? Then read_subroutine_type() would have to retrieve the function pointer from the per-arch module data to be able to call it for the function currently evaluated. That sounds like overkill. Or I missed something essential. I'd be happy about some more information. Thanks, Corinna