Quality of gcc implementation of Objective C?

25 views
Skip to first unread message

Nelson Minar

unread,
Jun 24, 1994, 2:06:36 PM6/24/94
to
I'm currently working on a project that needs a dynamic object
oriented extension to C. We've talked about designing our own, but
after working through a lot of the design it looks like what we need
might be exactly what Objective C provides. Now that gcc is out,
Objective C is a viable option, but I don't know much about gcc's
implementation. I could use some advice beyond what is in the FAQ.

Is the gcc Objective C compiler stable? Will it port to the same UNIX
architectures that gcc itself ports to?

Is there any documentation for what gcc supports? There's nothing in
the texinfo document yet. I found the file "gnu-objc-issues-1.0.tar.Z"
on prep.ai.mit.edu, which seems to be a discussion of gcc support, but
it's now a year old.

I'm aware that there isn't much of a library yet, but there seems to
be enough to get going. Am I right?

How much runtime information can I get to? In particular, there are
two complicated things I'll need to be able to do:

Dynamic instance variable lookup, something like sel_getUid() for
variables. (In our model, every object's variables are readable by
anyone via a global "probe" accessor function. That "probe" function
should be generated by our system.)

I need to be able to conveniently override the entire message
dispatch, or at least augment it. In particular, we're someday going
to be running this on a parallel system, and objects might be
on different parts of the network. It looks like Next addressed this
problem, and if CORBA support is ever going into Objective C they'll
address the problem, too, so I'm hopeful.

Any help is greatly appreciated,
Nelson

Paul F. Kunz

unread,
Jun 24, 1994, 11:53:50 PM6/24/94
to
>>>>> On 24 Jun 1994 18:06:36 GMT, nel...@grasshopper.santafe.edu (Nelson Minar) said:

In article <2uf7bc$e...@scratchy.reed.edu> nel...@grasshopper.santafe.edu (Nelson Minar) writes:


> Is the gcc Objective C compiler stable?

Yes.

> Will it port to the same
> UNIX architectures that gcc itself ports to?

I've heard of our library running on SunOS 4.1, Solaris, Ultrix,
IRIX, HP/UX, FreeBSD, and Linux. There's a small problem on AIX.

> Is there any documentation for what gcc supports?

It supports the same as NeXT's Objective-C. Addison/Wesely
publishes NeXT's description of the language, so that's the document
you want.

> I'm aware that there isn't much of a library yet, but there seems to
> be enough to get going. Am I right?
>

Right.

> How much runtime information can I get to? In particular, there are
> two complicated things I'll need to be able to do:

> Dynamic instance variable lookup, something like sel_getUid() for
> variables. (In our model, every object's variables are readable by
> anyone via a global "probe" accessor function. That "probe" function
> should be generated by our system.)

Functions to get-Ivar, set-Ivar, and find-Ivar are part of our
library distribution (objcX).

> I need to be able to conveniently override the entire message
> dispatch, or at least augment it. In particular, we're someday going
> to be running this on a parallel system, and objects might be on
> different parts of the network. It looks like Next addressed this
> problem, and if CORBA support is ever going into Objective C they'll
> address the problem, too, so I'm hopeful.

It was stated by some folks that did their own distributed object
system with Objective-C that it would take 4-6 man-months to
completely emulate NeXT's system.

> Any help is greatly appreciated, Nelson

You didn't ask about debugging. The mangled method names are easy
to remember with GNU Objective-C. So setting breakpoints with gdb
isn't so bad. For example, to set a breakpoint at the entry of
method '-foo:withBar:' in class MyObject you type...

gdb> b _i_MyObject__foo_withBar_

To print all the instance variables, it's...

gdb> p *self

If you strongly declare your instance variables, you get more
meaningful information from gdb. For example...

@class View; // NeXT and GNU extension to original language
@interface MyObject
{
View *view;
,,,,

gdb> p self->view

gives all the ivars of a view object

From having a debuger that understands your language sufficiently
well is good enough reason not to invent your own language but to go
with Objective-C.


--
Paul F. Kunz Paul...@slac.stanford.edu (NeXT mail ok)
Stanford Linear Accelerator Center, Stanford University
Voice: (415) 926-2884 (NeXT) Fax: (415) 926-3587

Eike Dierks

unread,
Jun 27, 1994, 3:15:07 PM6/27/94
to
In article <PFKEB.94J...@kaon.SLAC.Stanford.EDU>
pf...@kaon.SLAC.Stanford.EDU (Paul F. Kunz) writes:
> You didn't ask about debugging. The mangled method names are easy
> to remember with GNU Objective-C. So setting breakpoints with gdb
> isn't so bad. For example, to set a breakpoint at the entry of
> method '-foo:withBar:' in class MyObject you type...
>
> gdb> b _i_MyObject__foo_withBar_

I thought that Next's extension to gdb are also under GNU license. Doesn't
this work with the plain GNU-cc/GNU-ObjC runtime ?

Next's gdb allows you to set breakpoints without demangling names i.e.
"gdb>b [MyObject foo:withBar:]" or "gdb>b foo:withBar:"

Paul F. Kunz

unread,
Jun 28, 1994, 10:51:24 AM6/28/94
to
>>>>> On Mon, 27 Jun 1994 19:15:07 GMT, ei...@ilink.de (Eike Dierks) said:
In article <Cs2LH...@ilink.de> ei...@ilink.de (Eike Dierks) writes:


> In article <PFKEB.94J...@kaon.SLAC.Stanford.EDU>
> pf...@kaon.SLAC.Stanford.EDU (Paul F. Kunz) writes:
>> You didn't ask about debugging. The mangled method names are easy
>> to remember with GNU Objective-C. So setting breakpoints with gdb
>> isn't so bad. For example, to set a breakpoint at the entry of
>> method '-foo:withBar:' in class MyObject you type...
>> gdb> b _i_MyObject__foo_withBar_

> I thought that Next's extension to gdb are also under GNU
> license.

True, but someone has to do the work of taking the sources NeXT has
provided and integrating them with the latest gdb sources

> Next's gdb allows you to set breakpoints without demangling names
> i.e. "gdb>b [MyObject foo:withBar:]" or "gdb>b foo:withBar:"

To achieve this feature, NeXT modified its linker to allow ":" in
the symbol names.

Pieter Schoenmakers

unread,
Jun 30, 1994, 1:51:13 PM6/30/94
to

True, but someone has to do the work of taking the sources NeXT has
provided and integrating them with the latest gdb sources

Which is quite some work given NeXT's exotic layout of objective-c stuff in
the object files. --Tiggr

Reply all
Reply to author
Forward
0 new messages