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: Jim Blandy <jimb at redhat dot com>
- To: Adam Fedor <fedor at doc dot com>
- Cc: Michael Snyder <msnyder at redhat dot com>, gdb-patches at sources dot redhat dot com
- Date: 14 Oct 2002 14:51:06 -0500
- Subject: Re: [PATCH] Objective-C language support.
- References: <3D889A97.90202@doc.com> <3DA37187.57F232FE@redhat.com>
Can we have a more extensive comment here? What are symbols that
begin with ".objc_"? Why should we ignore them? Where can we find
more complete documentation for what they mean? (Is there any
document that describes how Objective C programs are represented at
the assembly/linkage level?)
Michael Snyder <msnyder@redhat.com> writes:
> 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
> >
>
> Jim, could you take a quick look at this small change?
> [Adam, the comment needs a period followed by two spaces.]
>
>
> > * elfread.c (elf_symtab_read): Skip ObjC symbols.
>
> > Index: gdb/elfread.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/elfread.c,v
> > retrieving revision 1.23
> > diff -u -p -r1.23 elfread.c
> > --- gdb/elfread.c 24 Jul 2002 23:51:35 -0000 1.23
> > +++ gdb/elfread.c 17 Sep 2002 19:29:59 -0000
> > @@ -349,7 +349,12 @@ elf_symtab_read (struct objfile *objfile
> > }
> > else if (sym->section->flags & SEC_CODE)
> > {
> > - if (sym->flags & BSF_GLOBAL)
> > + if (sym->name[0] == '.' && (strncmp (sym->name + 1, "objc_", 4) == 0))
> > + {
> > + /* Looks like an Objective-C special symbol */
> > + continue;
> > + }
> > + else if (sym->flags & BSF_GLOBAL)
> > {
> > ms_type = mst_text;
> > }