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: Adam Fedor <fedor at doc dot com>
- Cc: gdb-patches at sources dot redhat dot com, jimb at redhat dot com
- Date: Tue, 08 Oct 2002 17:00:07 -0700
- Subject: Re: [PATCH] Objective-C language support.
- Organization: Red Hat, Inc.
- References: <3D889A97.90202@doc.com>
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;
> }