From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5693 invoked by alias); 5 Oct 2004 16:21:10 -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 5682 invoked from network); 5 Oct 2004 16:21:09 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 5 Oct 2004 16:21:09 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i95GL829032447 for ; Tue, 5 Oct 2004 12:21:08 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i95GL7j22713 for ; Tue, 5 Oct 2004 12:21:07 -0400 Received: from cygbert.vinschen.de (vpn50-25.rdu.redhat.com [172.16.50.25]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i95GL6V12029 for ; Tue, 5 Oct 2004 09:21:06 -0700 Received: by cygbert.vinschen.de (Postfix, from userid 500) id E316E58092; Tue, 5 Oct 2004 18:22:05 +0200 (CEST) Date: Tue, 05 Oct 2004 16:21:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: [RFA] dwarf2read.c: Use make_function_type instead of lookup_function_type Message-ID: <20041005162205.GA31478@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-SW-Source: 2004-10/txt/msg00086.txt.bz2 Hi, the below patch uses make_function_type instead of lookup_function_type in read_subroutine_type. The reason is that it's important that `ftype' is a new type structure for each function and so it shouldn't get reused by other function types. The comment for lookup_function_type indicates that it's made to do exactly that, reusing already existing function types as they fit. That's not implemented so far, but it might happen at one point, so I suggest to switch to make_function_type in read_subroutine_type before something weird happens. Ok to check in? Corinna * dwarf2read.c (read_subroutine_type): Call make_function_type instead of lookup_function_type. Index: dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.164 diff -u -p -r1.164 dwarf2read.c --- dwarf2read.c 3 Oct 2004 16:16:01 -0000 1.164 +++ dwarf2read.c 5 Oct 2004 16:07:04 -0000 @@ -4413,7 +4413,7 @@ read_subroutine_type (struct die_info *d return; } type = die_type (die, cu); - ftype = lookup_function_type (type); + ftype = make_function_type (type, (struct type **) 0); /* All functions in C++ and Java have prototypes. */ attr = dwarf2_attr (die, DW_AT_prototyped, cu); -- Corinna Vinschen Cygwin Project Co-Leader Red Hat, Inc.