Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Apple's Objective-C language patch
@ 2002-09-09 13:16 Adam Fedor
  2002-09-09 17:34 ` Jason Molenda
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Fedor @ 2002-09-09 13:16 UTC (permalink / raw)
  To: gdb

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.

In case your wondering, you can see the current version of the patch 
(against the Sep 1 CVS) at

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

I didn't really know how to include new files and directories in the 
patch so now it's a patch plus a bunch of files.

1. Should I submit the whole patch at once or try to break it down into 
manageable pieces? Currently it's about 2000 lines of changes plus new 
files - including documentation and testsuite changes.

2. Is there more testing I should do or anything else I should consider 
before submitting it?

-- 
Adam Fedor, Digital Optics Corp.      | I'm glad I hate spinach, because
http://www.doc.com                    | if I didn't, I'd eat it, and you
http://www.gnustep.org                | know how I hate the stuff.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Apple's Objective-C language patch
  2002-09-09 13:16 Apple's Objective-C language patch Adam Fedor
@ 2002-09-09 17:34 ` Jason Molenda
  2002-09-09 20:30   ` Adam Fedor
  0 siblings, 1 reply; 11+ messages in thread
From: Jason Molenda @ 2002-09-09 17:34 UTC (permalink / raw)
  To: Adam Fedor; +Cc: gdb

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Apple's Objective-C language patch
  2002-09-09 17:34 ` Jason Molenda
@ 2002-09-09 20:30   ` Adam Fedor
  2002-09-09 20:49     ` Andrew Cagney
  2002-09-09 21:59     ` Jason Molenda
  0 siblings, 2 replies; 11+ messages in thread
From: Adam Fedor @ 2002-09-09 20:30 UTC (permalink / raw)
  To: Jason Molenda; +Cc: gdb

Jason Molenda wrote:
> 
> 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.
> 

I got everything, including objc-exp.y from the 'recent' Apple patch. I 
haven't looked at the latest Apple sources - I didn't know if I should 
do that since Andrew Cagney told me to work from the patch, but perhaps 
I misunderstood.

Thanks for the other comments. I'll have to look at name demangling more 
closely to see what's happening.

-- 
Adam Fedor, Digital Optics Corp.      | I'm glad I hate spinach, because
http://www.doc.com                    | if I didn't, I'd eat it, and you
                                       | know how I hate the stuff.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Apple's Objective-C language patch
  2002-09-09 20:30   ` Adam Fedor
@ 2002-09-09 20:49     ` Andrew Cagney
  2002-09-09 20:55       ` Jason Molenda
                         ` (2 more replies)
  2002-09-09 21:59     ` Jason Molenda
  1 sibling, 3 replies; 11+ messages in thread
From: Andrew Cagney @ 2002-09-09 20:49 UTC (permalink / raw)
  To: Adam Fedor; +Cc: Jason Molenda, gdb

> Jason Molenda wrote:
> 
> 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.
> 
> 
> I got everything, including objc-exp.y from the 'recent' Apple patch. I haven't looked at the latest Apple sources - I didn't know if I should do that since Andrew Cagney told me to work from the patch, but perhaps I misunderstood.

Yes, I would have requested this.

Believe it or not, very recently added to my things to do today list is 
to get an answer to the question: can a third party take random 
Apple/GDB sources and contribute them to the FSF.

Andrew



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Apple's Objective-C language patch
  2002-09-09 20:49     ` Andrew Cagney
@ 2002-09-09 20:55       ` Jason Molenda
  2002-09-09 21:30         ` Andrew Cagney
  2002-09-09 20:58       ` Daniel Berlin
  2002-09-11  9:03       ` Stan Shebs
  2 siblings, 1 reply; 11+ messages in thread
From: Jason Molenda @ 2002-09-09 20:55 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Adam Fedor, gdb

On Mon, Sep 09, 2002 at 11:49:11PM -0400, Andrew Cagney wrote:

> Believe it or not, very recently added to my things to do today list is 
> to get an answer to the question: can a third party take random 
> Apple/GDB sources and contribute them to the FSF.


Speaking for all of Apple as its duly appointed representative in
all things gdb related (heh heh), I declare yes!  Yes, I tell you!

Seriously though, we've got a blanket assignment on file at the
FSF for gcc and gdb, and the only reason the code isn't getting
submitted is because of time being spent on other activities by
the two Apple gdb developers.

If there are contributors who want to help but don't want to mess
with Apple's anoncvs server I'd be willing to tar up another copy
of our sources (Klee merged it just a couple weeks ago with the
FSF sources), but this isn't the sort of thing I'd want to do on
a frequent basis..


Jason

PS- if that third party developer does do nonobvious/nontrivial
changes to the patches to get them approved in FSF-gdb, I'd imagine
the third party developer would technically need an FSF assignment
on file before they could be accepted.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Apple's Objective-C language patch
  2002-09-09 20:49     ` Andrew Cagney
  2002-09-09 20:55       ` Jason Molenda
@ 2002-09-09 20:58       ` Daniel Berlin
  2002-09-09 21:00         ` Daniel Berlin
  2002-09-11  9:03       ` Stan Shebs
  2 siblings, 1 reply; 11+ messages in thread
From: Daniel Berlin @ 2002-09-09 20:58 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Adam Fedor, Jason Molenda, gdb



On Mon, 9 Sep 2002, Andrew Cagney wrote:

> > Jason Molenda wrote:
> > 
> > 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.
> > 
> > 
> > I got everything, including objc-exp.y from the 'recent' Apple patch. I haven't looked at the latest Apple sources - I didn't know if I should do that since Andrew Cagney told me to work from the patch, but perhaps I misunderstood.
> 
> Yes, I would have requested this.
> 
> Believe it or not, very recently added to my things to do today list is 
> to get an answer to the question: can a third party take random 
> Apple/GDB sources and contribute them to the FSF.

Does Apple have a copyright assignment covering this stuff?
If so, then AFAIK, it's already "contributed" in the legal sense, since 
the FSF has the copyright to it.It doesn't particular matter *where* the 
copies exist (Apple's sources or the FSF sources) or who made them, only 
who owns the work. where/who is only important when trying to determine 
infringement. The FSF can't be infringing if it owns the work.  It's a 
slightly unclear issue if you've modified the sources, and have no 
copyright assignment with the FSF, and contribute them to GDB (derivative 
works and all that jazz).
But as long as the person contributing the apple stuff is either
1. Not making changes to the source in question (in which case their 
is no question it's a copy of the original work).
*OR*
2. Has a copyright assignment for GDB work with the FSF.

then there should be no problem (assuming apple has copyright 
assignment covering this stuff).

IANAL (yet), and this is not to be construed as "office legal advice".
Just rantings of a loon.
I could get you a definitive opinion fairly quickly from a lawyer if you 
like (and you can answer the various assignment questions about the 
code/people involved).
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Apple's Objective-C language patch
  2002-09-09 20:58       ` Daniel Berlin
@ 2002-09-09 21:00         ` Daniel Berlin
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Berlin @ 2002-09-09 21:00 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Adam Fedor, Jason Molenda, gdb

...
> 
> then there should be no problem (assuming apple has copyright 
> assignment covering this stuff).
> 
> IANAL (yet), and this is not to be construed as "office legal advice".
						   ^^^^^^
						   s/office/official/g
> 
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Apple's Objective-C language patch
  2002-09-09 20:55       ` Jason Molenda
@ 2002-09-09 21:30         ` Andrew Cagney
  2002-09-09 23:21           ` Jason Molenda
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Cagney @ 2002-09-09 21:30 UTC (permalink / raw)
  To: Jason Molenda; +Cc: Adam Fedor, gdb

> On Mon, Sep 09, 2002 at 11:49:11PM -0400, Andrew Cagney wrote:
> 
> 
>> Believe it or not, very recently added to my things to do today list is 
>> to get an answer to the question: can a third party take random 
>> Apple/GDB sources and contribute them to the FSF.
> 
> 
> 
> Speaking for all of Apple as its duly appointed representative in
> all things gdb related (heh heh), I declare yes!  Yes, I tell you!

I know.  and I believe this was was the likely intent.  Just need to 
check that this is what Apple actually signed up to -> I need to ask a 
lawyer with the actual paper work in front of them to give a nod.

This doesn't stop you creating a new tarball and/or similar.

> Seriously though, we've got a blanket assignment on file at the
> FSF for gcc and gdb, and the only reason the code isn't getting
> submitted is because of time being spent on other activities by
> the two Apple gdb developers.
> 
> If there are contributors who want to help but don't want to mess
> with Apple's anoncvs server I'd be willing to tar up another copy
> of our sources (Klee merged it just a couple weeks ago with the
> FSF sources), but this isn't the sort of thing I'd want to do on
> a frequent basis..
> 
> 
> Jason
> 
> PS- if that third party developer does do nonobvious/nontrivial
> changes to the patches to get them approved in FSF-gdb, I'd imagine
> the third party developer would technically need an FSF assignment
> on file before they could be accepted.

Yes.  This is why both Adam (objective-c) and Aidan (Ada) have an FSF 
assignment.

Andrew





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Apple's Objective-C language patch
  2002-09-09 20:30   ` Adam Fedor
  2002-09-09 20:49     ` Andrew Cagney
@ 2002-09-09 21:59     ` Jason Molenda
  1 sibling, 0 replies; 11+ messages in thread
From: Jason Molenda @ 2002-09-09 21:59 UTC (permalink / raw)
  To: Adam Fedor; +Cc: gdb

On Mon, Sep 09, 2002 at 09:30:42PM -0600, Adam Fedor wrote:

> 
> I got everything, including objc-exp.y from the 'recent' Apple patch. I 
> haven't looked at the latest Apple sources - I didn't know if I should 
> do that since Andrew Cagney told me to work from the patch, but perhaps 
> I misunderstood.

Ah you're right, there was a separate objc-exp.y file last year.
I don't want to complicate your task, but the current sources have
it merged into c-exp.y, and I think that's a better route to take.

I will work on another source drop but I don't know if I'll have free
time to do it before next weekend. :-/

> Thanks for the other comments. I'll have to look at name demangling more 
> closely to see what's happening.

Yeah, I wouldn't sweat that point too much - it doesn't hurt to do
checks for mangled objc names, and there may be some people who
want to use objc on Windows and need to mangle the names or something.
I'm sort of hoping someone with more historical knowledge can step up
and say what's the deal with that...

J


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Apple's Objective-C language patch
  2002-09-09 21:30         ` Andrew Cagney
@ 2002-09-09 23:21           ` Jason Molenda
  0 siblings, 0 replies; 11+ messages in thread
From: Jason Molenda @ 2002-09-09 23:21 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Adam Fedor, gdb

On Tue, Sep 10, 2002 at 12:30:14AM -0400, Andrew Cagney wrote:

> I know.  and I believe this was was the likely intent.  Just need to 
> check that this is what Apple actually signed up to -> I need to ask a 
> lawyer with the actual paper work in front of them to give a nod.


BTW, I can't answer the legal question here, but I can guarantee
you that the intention within Apple - understood by all our managers
- is to get as many of our changes into the FSF versions as possible.
Mostly they're not submitted because no one has time to fix them
and address issues raised by FSF maintainers.  Some changes won't
ever go in because they're grody hacks, some won't go because
they're design decisions the FSF maintainers won't agree with.

But we derive no joy by hoarding our changes to gcc/gdb - share
and ejoy, I promise you that's the intention.  Given that the
changes must be distributed under the GPL, and given our blanket
copyright assignment for changes to gcc/gdb, it's hard to imagine
how we could intend otherwise.

J


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Apple's Objective-C language patch
  2002-09-09 20:49     ` Andrew Cagney
  2002-09-09 20:55       ` Jason Molenda
  2002-09-09 20:58       ` Daniel Berlin
@ 2002-09-11  9:03       ` Stan Shebs
  2 siblings, 0 replies; 11+ messages in thread
From: Stan Shebs @ 2002-09-11  9:03 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Adam Fedor, Jason Molenda, gdb

Andrew Cagney wrote:

> Believe it or not, very recently added to my things to do today list 
> is to get an answer to the question: can a third party take random 
> Apple/GDB sources and contribute them to the FSF.

Yes.  The sources are both copyright-assigned and published; doesn't
matter who performs the mechanics of pasting the changes from one
public repository into another.

Also, if there is any remaining doubt, I have personally seen Apple's
copyright assignment for GDB and talked about it with our lawyer that
specializes in open source issues (who by now has probably spent more
time with RMS than anybody else at Apple 1/2 :-) ), and there are no
obstacles to incorporating any and all Apple mods into FSF GDB.

(I'd actually like to spend more time on the GDB patches, but we have
some 260 local patches in GCC, around 40Kloc of code all told, just
managing those is a big job...)

Stan




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-09-11 16:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-09 13:16 Apple's Objective-C language patch Adam Fedor
2002-09-09 17:34 ` Jason Molenda
2002-09-09 20:30   ` Adam Fedor
2002-09-09 20:49     ` Andrew Cagney
2002-09-09 20:55       ` Jason Molenda
2002-09-09 21:30         ` Andrew Cagney
2002-09-09 23:21           ` Jason Molenda
2002-09-09 20:58       ` Daniel Berlin
2002-09-09 21:00         ` Daniel Berlin
2002-09-11  9:03       ` Stan Shebs
2002-09-09 21:59     ` Jason Molenda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox