This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Objective-C language support.
- From: Michael Snyder <msnyder at redhat dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: Jim Blandy <jimb at redhat dot com>, Adam Fedor <fedor at doc dot com>, gdb-patches at sources dot redhat dot com
- Date: Tue, 22 Oct 2002 17:03:22 -0700
- Subject: Re: [PATCH] Objective-C language support.
- Organization: Red Hat, Inc.
- References: <3D889A97.90202@doc.com> <3DA36F49.8AD2DD1E@redhat.com> <vt2vg44u7gs.fsf@zenia.red-bean.com> <3DB47FA1.5080706@redhat.com>
Andrew Cagney wrote:
>
> > This change is approved. (Thanks for the reminder, Michael.)
> >
> > Michael Snyder <msnyder@redhat.com> writes:
>
> I think, here, that garish macro needs to be re-written as a function.
> Any symtab maintainer care to do it?
Mumble mumble... I'm trying to get to it, but stuff-for-which-I-get-paid
keeps coming up. ;-(
>
> 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
> >
> >