This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Apple's Objective-C language patch


Hi Adam,

I'm on not on the Apple gdb deverloper team, nor am I a member of
the FSF gdb maintainers, so the comments and $3 will get you a cup
of coffee.  Feel free to ignore me.

On Mon, Sep 09, 2002 at 02:16:06PM -0600, Adam Fedor wrote:
> I've distilled and modified Apple's gdb patches for adding Objective-C 
> language support. I've had several people test it and I suppose I might 
> be ready to submit it soon, but first I wanted to ask a few questions.

Wow!

> ftp://ftp.gnustep.org/pub/gnustep/contrib/gdb-objc-patch.tar.gz

What is the history behind objc-exp.y?  Is this from the old
gnustep-gdb patch that'd been floating around since the mid-90's
(the one that Michael Snyder wrote while at NeXT)?  The Apple
sources have the ObjC support rolled in c-exp.y; it doesn't seem
unreasonable given the overlap between the two expression syntaxes.

Mmmm...a testsuite/gdb.objc directory, you don't say... hey, what do you
know, the Apple gdb repository now has a gdb.objc directory!  Huzzah! ;-)

The change to symtab.c:lookup_partial_symbol is incorrect, you
should drop it from the patch.  (it was in the Apple source drop
that you based your patch on; it is gone now from our sources)

Do you really need objfile_demangle_msymbols() ?  minsyms.c should
already be handling this correctly via install_minimal_symbols.
I think the changes to minsyms.c, objfiles.h, and the references
to that func in symtab.[ch] are unnecessary.  But then, I haven't
tested that at all.  Using objfile_demangle_msymbols can have the
unfortunate side-effect of running all minsyms through the demangler
twice -- the current Apple sources have hacked out the demangle
pass done by install_minimal_symbols, but I don't think that's the
right approach for the FSF sources.

On the topic of demangling, are the ObjC symbol names mangled on 
an ELF system?  On MachO, ObjC names are stored in the object file
without any mangling.  I think ObjC used to be used on some platforms
where mangling was necessary (Windows?) but I don't know if anyone
is still using ObjC in an environment where names are mangled.
It's a minor concern; not the sort of thing which should hold up
the patch from acceptance into the FSF sources--and I'm sure there
are more knowledable people than me on this topic.

I only read over the patches very quickly, but it looks reasonable
to me.  Good work!

J


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]