Re: [PATCH] Objective-C language support.

Andrew Cagney
2002-09-18T18:57:34Z

> 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
>>
>
>
>
> Oh lord. I suppose I am the only one here who is
> even noddingly familiar with Objective C?
>
> There's a good chance that I wrote some of this code
> anyway, so I'll try to have a look at it. You know,
> of course, that we can't just drop something this huge
> into the source tree without some review...
>
> I'll need the ability to run the tests. Does GCC already
> have enough objc to compile them? Will I need any special
> libraries?

For Ada, a different approach has been taken:

- commit the new files (but not changes to old files)
- commit the makefile rules for the new files (but not changes that
would cause these files to build by default)
- clean the files up so that they meet current coding conventions -
-Werror, ARI, ... (for Ada the files were all K&R, looking back.)
- slowly contribute/merge the patches to other files
- add the missing makefile bits making it part of GDB

This way, the bulk of the code is in the mainline. I think it works
better since:

- people can see the code (there have already been several patches go
through where the Ada code was ``fixed'' for free, just by virtue of
being part of the repository).
- while being developed, doesn't break the existing builds

With this, the worst that can happen is the code never gets enabled.

The other thing is that, very like when someone adds new a architecture,
other than the contributor, no one immediatly cares if it doesn't work
quite right. Just as long as it hasn't actually broken other parts of
GDB and hasn't hasn't done anything really really nasty at the
implementation level (ari and -Werror cover most of that).

enjoy,
Andrew