From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31655 invoked by alias); 22 Aug 2002 20:41:35 -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 31648 invoked from network); 22 Aug 2002 20:41:33 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 22 Aug 2002 20:41:33 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17hyln-0000Mn-00; Thu, 22 Aug 2002 15:41:31 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17hymS-0008GE-00; Thu, 22 Aug 2002 16:42:12 -0400 Date: Thu, 22 Aug 2002 13:52:00 -0000 From: Daniel Jacobowitz To: David Carlton Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] dwarf2read.c: set TYPE_DOMAIN_TYPE correctly for methods Message-ID: <20020822204211.GA31727@nevyn.them.org> Mail-Followup-To: David Carlton , gdb-patches@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2002-08/txt/msg00711.txt.bz2 On Thu, Aug 22, 2002 at 01:35:50PM -0700, David Carlton wrote: > I've figured out what caused the regression that I turned up in PR > gdb/653; here's a patch that fixes it. > > David Carlton > carlton@math.stanford.edu > > 2002-08-22 David Carlton > > * dwarf2read.c (dwarf2_add_member_fn): Add back in the type > argument that was deleted on 2002-06-14: it was needed after all, > as PR gdb/653 demonstrates. Update call to smash_to_method_type. > (read_structure_scope): Update call to dwarf2_add_member_fn. Can you explain why this is necessary? I could not find any path to that point where type != die->type. > > Index: dwarf2read.c > =================================================================== > RCS file: /cvs/src/src/gdb/dwarf2read.c,v > retrieving revision 1.65 > diff -u -p -r1.65 dwarf2read.c > --- dwarf2read.c 20 Aug 2002 18:45:30 -0000 1.65 > +++ dwarf2read.c 22 Aug 2002 20:13:53 -0000 > @@ -803,7 +803,8 @@ static void dwarf2_attach_fields_to_type > struct type *, struct objfile *); > > static void dwarf2_add_member_fn (struct field_info *, > - struct die_info *, struct objfile *objfile, > + struct die_info *, struct type *, > + struct objfile *objfile, > const struct comp_unit_head *); > > static void dwarf2_attach_fn_fields_to_type (struct field_info *, > @@ -2259,7 +2260,7 @@ dwarf2_attach_fields_to_type (struct fie > > static void > dwarf2_add_member_fn (struct field_info *fip, struct die_info *die, > - struct objfile *objfile, > + struct type *type, struct objfile *objfile, > const struct comp_unit_head *cu_header) > { > struct attribute *attr; > @@ -2327,7 +2328,7 @@ dwarf2_add_member_fn (struct field_info > struct type *return_type = TYPE_TARGET_TYPE (die->type); > int nparams = TYPE_NFIELDS (die->type); > > - smash_to_method_type (fnp->type, die->type, > + smash_to_method_type (fnp->type, type, > TYPE_TARGET_TYPE (die->type), > TYPE_FIELDS (die->type), > TYPE_NFIELDS (die->type), > @@ -2516,7 +2517,7 @@ read_structure_scope (struct die_info *d > { > /* C++ member function. */ > process_die (child_die, objfile, cu_header); > - dwarf2_add_member_fn (&fi, child_die, objfile, cu_header); > + dwarf2_add_member_fn (&fi, child_die, type, objfile, cu_header); > } > else if (child_die->tag == DW_TAG_inheritance) > { > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer