From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16125 invoked by alias); 20 Mar 2003 21:39:57 -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 16118 invoked from network); 20 Mar 2003 21:39:56 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 20 Mar 2003 21:39:56 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18w9er-0001RG-00; Thu, 20 Mar 2003 17:41:13 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18w7lJ-0004Xb-00; Thu, 20 Mar 2003 16:39:45 -0500 Date: Thu, 20 Mar 2003 21:39:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Adam Fedor , GDB Patches Subject: Re: [RFA] Compile objc-lang.c, objc-exp.tab.c [1/5] Message-ID: <20030320213945.GA17345@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Adam Fedor , GDB Patches References: <3E16093D.3070907@doc.com> <3E7A3226.9040904@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E7A3226.9040904@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-03/txt/msg00439.txt.bz2 Not without some substantial thought. We use cplus_demangle in a lot of places where we don't even know what the language is supposed to be - for minsyms, during lookups, et cetera. Certainly it needs to be thought about. At least objc's mangling is probably not entirely ambiguous with C++/Java's? I don't know. On Thu, Mar 20, 2003 at 04:27:02PM -0500, Andrew Cagney wrote: > Daniel, > > Would it be possible to make the cplus_demangle() method part of the > language vector? That way code like the patch below could be reduced to: > > /* Return demangled language symbol, or NULL. */ > language_demangle (current_language, arg); > > This would in turn allow Adam to just add an equivalent objc_demangle() > method to the objc language vector, and hence eliminate the need to > always link in objc-lang.c. > > Andrew > > >RCS file: /cvs/src/src/gdb/maint.c,v > >retrieving revision 1.30 > >diff -u -p -r1.30 maint.c > >--- maint.c 24 Dec 2002 03:57:58 -0000 1.30 > >+++ maint.c 3 Jan 2003 03:06:25 -0000 > >@@ -35,6 +35,7 @@ > > #include "symfile.h" > > #include "objfiles.h" > > #include "value.h" > >+#include "objc-lang.h" > > > > #include "cli/cli-decode.h" > > > >@@ -154,9 +155,8 @@ maintenance_demangle (char *args, int fr > > switch (current_language->la_language) > > { > > case language_objc: > >- /* Commented out until ObjC handling is enabled. */ > >- /* demangled = objc_demangle (args); */ > >- /* break; */ > >+ demangled = objc_demangle (args); > >+ break; > > case language_cplus: > > default: > > demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS); > > > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer