From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5872 invoked by alias); 21 Oct 2002 22:28:52 -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 5865 invoked from network); 21 Oct 2002 22:28:51 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 21 Oct 2002 22:28:51 -0000 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 9B303800084; Mon, 21 Oct 2002 18:28:50 -0400 (EDT) Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id C16573E12; Mon, 21 Oct 2002 18:28:49 -0400 (EDT) Message-ID: <3DB47FA1.5080706@redhat.com> Date: Mon, 21 Oct 2002 15:28:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jim Blandy Cc: Michael Snyder , Adam Fedor , gdb-patches@sources.redhat.com Subject: Re: [PATCH] Objective-C language support. References: <3D889A97.90202@doc.com> <3DA36F49.8AD2DD1E@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-10/txt/msg00359.txt.bz2 > This change is approved. (Thanks for the reminder, Michael.) > > Michael Snyder writes: I think, here, that garish macro needs to be re-written as a function. Any symtab maintainer care to do it? Andrew >> 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 > >