From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8549 invoked by alias); 14 Oct 2002 20:08:50 -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 8431 invoked from network); 14 Oct 2002 20:08:48 -0000 Received: from unknown (HELO zenia.red-bean.com) (66.244.67.22) by sources.redhat.com with SMTP; 14 Oct 2002 20:08:48 -0000 Received: (from jimb@localhost) by zenia.red-bean.com (8.11.6/8.11.6) id g9EJp6M27734; Mon, 14 Oct 2002 14:51:06 -0500 To: Adam Fedor Cc: Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [PATCH] Objective-C language support. References: <3D889A97.90202@doc.com> <3DA37187.57F232FE@redhat.com> From: Jim Blandy Date: Mon, 14 Oct 2002 13:08:00 -0000 In-Reply-To: <3DA37187.57F232FE@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.90 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-10/txt/msg00257.txt.bz2 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 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; > > }