From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12254 invoked by alias); 1 Nov 2002 16:43:43 -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 12209 invoked from network); 1 Nov 2002 16:43:43 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 1 Nov 2002 16:43:43 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 187fp9-0003m1-00 for ; Fri, 01 Nov 2002 11:43:11 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 187euJ-0002Lk-00 for ; Fri, 01 Nov 2002 11:44:27 -0500 Date: Fri, 01 Nov 2002 08:43:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [drow-cplus-branch] v3 destructors Message-ID: <20021101164427.GA9014@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20021101163729.GA7955@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021101163729.GA7955@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-11/txt/msg00002.txt.bz2 On Fri, Nov 01, 2002 at 11:37:29AM -0500, Daniel Jacobowitz wrote: > I've now added code to the stabs reader to report destructor field names > properly. This changes get_destructor_fn_field_name to use that, but not to > rely on it. > > I need to double-check with the HP reader, but I can probably rely on this > now, and kill all physname checks for this purpose. One down, N to go, next > on the hitlist is decode_line_2 once I figure out an approach. Then calling > functions. > > -- > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer > Oops, with patch. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2002-11-01 Daniel Jacobowitz * gdbtypes.c (get_destructor_fn_field): Return obvious destructors based on method name. Index: gdbtypes.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtypes.c,v retrieving revision 1.59.2.1 diff -u -p -r1.59.2.1 gdbtypes.c --- gdbtypes.c 26 Oct 2002 17:12:07 -0000 1.59.2.1 +++ gdbtypes.c 31 Oct 2002 23:04:35 -0000 @@ -1311,6 +1311,13 @@ get_destructor_fn_field (struct type *t, int j; struct fn_field *f = TYPE_FN_FIELDLIST1 (t, i); + if (TYPE_FN_FIELDLIST_NAME (t, i)[0] == '~') + { + *method_indexp = i; + *field_indexp = 0; + return 1; + } + for (j = 0; j < TYPE_FN_FIELDLIST_LENGTH (t, i); j++) { if (is_destructor_name (TYPE_FN_FIELD_PHYSNAME (f, j)) != 0)