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
- Date: Tue, 08 Oct 2002 17:06:41 -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
Adam, this is a pretty obvious change, please check it in as soon as
the defs.h change goes in.
> * printfcmd.c (address_info): Print 'self' for ObjC.
> Index: gdb/printcmd.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/printcmd.c,v
> retrieving revision 1.41
> diff -u -p -r1.41 printcmd.c
> --- gdb/printcmd.c 10 Sep 2002 02:04:38 -0000 1.41
> +++ gdb/printcmd.c 17 Sep 2002 19:30:55 -0000
> @@ -1104,7 +1104,11 @@ address_info (char *exp, int from_tty)
> printf_filtered ("Symbol \"");
> fprintf_symbol_filtered (gdb_stdout, exp,
> current_language->la_language, DMGL_ANSI);
> - printf_filtered ("\" is a field of the local class variable `this'\n");
> + printf_filtered ("\" is a field of the local class variable ");
> + if (current_language->la_language == language_objc)
> + printf_filtered ("'self'\n"); /* ObjC equivalent of "this" */
> + else
> + printf_filtered ("'this'\n");
> return;
> }
>