From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26320 invoked by alias); 8 Oct 2002 23:51:51 -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 26313 invoked from network); 8 Oct 2002 23:51:50 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 8 Oct 2002 23:51:50 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g98NW9X16793 for ; Tue, 8 Oct 2002 19:32:09 -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 g98Npil01566; Tue, 8 Oct 2002 19:51:44 -0400 Received: from redhat.com (dhcp-172-16-25-149.sfbay.redhat.com [172.16.25.149]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g98NphN29624; Tue, 8 Oct 2002 16:51:43 -0700 Message-ID: <3DA36F49.8AD2DD1E@redhat.com> Date: Tue, 08 Oct 2002 16:51:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Adam Fedor CC: gdb-patches@sources.redhat.com, jimb@redhat.com Subject: Re: [PATCH] Objective-C language support. References: <3D889A97.90202@doc.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-10/txt/msg00192.txt.bz2 Adam Fedor wrote: > > This patch adds Objective-C language support to gdb based upon a patch > provided by Apple Computer Inc from their version of gdb. Note that the > patch only contains changes to existing files. New files (objc-lang.h, > objc-lang.c, objc-exp.y) and a gdb.objc testsuite directory are located at > > ftp://ftp.gnustep.org/pub/gnustep/contrib/gdb-objc-patch.tar.gz This change is (remotely) related to symbol tables, which belong to Jim Blandy and Elena Zannoni. Jim, do you have any objection to this change? I think it's almost obvious, and recommend it for approval. > * symtab.h: New objc_specific struct. > (SYMBOL_INIT_LANGUAGE_SPECIFIC): Handle ObjC. > (SYMBOL_DEMANGLED_NAME): Likewise. > Index: gdb/symtab.h > =================================================================== > RCS file: /cvs/src/src/gdb/symtab.h,v > retrieving revision 1.39 > diff -u -p -r1.39 symtab.h > --- gdb/symtab.h 12 Sep 2002 19:19:37 -0000 1.39 > +++ gdb/symtab.h 17 Sep 2002 19:31:07 -0000 > @@ -89,6 +89,11 @@ struct general_symbol_info > char *demangled_name; > } > cplus_specific; > + struct objc_specific > + { > + char *demangled_name; > + } > + objc_specific; > #if 0 > /* OBSOLETE struct chill_specific *//* For Chill */ > /* OBSOLETE { */ > @@ -146,6 +151,10 @@ extern CORE_ADDR symbol_overlayed_addres > { \ > SYMBOL_CPLUS_DEMANGLED_NAME (symbol) = NULL; \ > } \ > + else if (SYMBOL_LANGUAGE (symbol) == language_objc) \ > + { \ > + SYMBOL_OBJC_DEMANGLED_NAME (symbol) = NULL; \ > + } \ > /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */ \ > /* OBSOLETE { */ \ > /* OBSOLETE SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */ \ > @@ -170,12 +179,17 @@ extern void symbol_init_demangled_name ( > (SYMBOL_LANGUAGE (symbol) == language_cplus \ > || SYMBOL_LANGUAGE (symbol) == language_java \ > ? SYMBOL_CPLUS_DEMANGLED_NAME (symbol) \ > + : (SYMBOL_LANGUAGE (symbol) == language_objc \ > + ? SYMBOL_OBJC_DEMANGLED_NAME (symbol) \ > : /* OBSOLETE (SYMBOL_LANGUAGE (symbol) == language_chill */ \ > /* OBSOLETE ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) */ \ > - NULL) > + NULL)) > > /* OBSOLETE #define SYMBOL_CHILL_DEMANGLED_NAME(symbol) */ > /* OBSOLETE (symbol)->ginfo.language_specific.chill_specific.demangled_name */ > + > +#define SYMBOL_OBJC_DEMANGLED_NAME(symbol) \ > + (symbol)->ginfo.language_specific.objc_specific.demangled_name > > /* Macro that returns the "natural source name" of a symbol. In C++ this is > the "demangled" form of the name if demangle is on and the "mangled" form