This is the mail archive of the gdb-patches@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]

Re: That dwarf2read patch i just submitted


On Oct 23, 12:55pm, Daniel Berlin wrote:

> Kevin Buettner <kevinb@cygnus.com> writes:
> 
> > On Oct 23, 10:02am, Daniel Berlin wrote:
> > 
> > > So no one feels slighted, that last dwarf2 patch I submitted (to add
> > > support for .debug_loc) is based on a patch I found on gdb-patches
> > > that is a few years old, submitted originally by one of the ADA guys.
> > > I cleaned it up so that it works with dwarf2read of today, but if you
> > > want credit, email me, and i'll put your name in the ChangeLog
> > > instead.
> > 
> > Dan,
> > 
> > You should definitely give credit to the original submitter of the
> > patch (whether they step forward or not).  Also, you should make sure
> > that we have a copyright assignment on file for whomever submitted
> > that patch.
> 
> The problem is I can't seem to find it in the archives anymore using
> the search engine, or else I would have. I really don't want to go
> back month by month, trying to find the patch again.

It looks to me like it was

    http://sources.redhat.com/ml/gdb-patches/1999-q2/msg00054.html

The author of this patch is Brian Nettleton.

> The patch is actually <30 lines of code, and thus, shouldn't require
> copyright assignment.

I'm not sure what the metric is for requiring a copyright assignment,
but I thought it was lower than 30.  (Perhaps Andrew could let us know?)

Anyway, you're off by an order of magnitude.  If I'm looking at the
right patch, it's actually 322 lines long.  The number of lines
affected by this patch is also greater than 30.  The locblock function
and corresponding comment alone are 39 lines.

> I also modified every line of the patch, literally.

It is true that you modified many of the lines, but you didn't touch
*all* of them.

E.g, with the exception of the comment (which you split to be on two
lines), the following section from Brian's patch appears to be identical
to what you submitted:

+ {
+   char *loc_ptr;
+   struct dwarf_block *result;
+ 
+   switch (attr->form)
+     {
+     case DW_FORM_block:
+     case DW_FORM_block1:
+     case DW_FORM_block2:
+     case DW_FORM_block4:
+       return DW_BLOCK(attr);
+     case DW_FORM_ref_addr:
+     case DW_FORM_ref_udata:
+       /* return the first block in the location list for now */
+       loc_ptr = dwarf_loc_buffer + dwarf2_get_ref_die_offset(attr);

Even if you had modified every line from Brian's patch, he should
still be credited for the changes.  It's a maintainer's job to adapt a
patch so that it works with current sources.  Adapting a patch that is
several years old may well require substantial modification, but the
original submitter should still be given credit.  (And if he's to be
given credit, we must then observe the FSF's mandates regarding
copyright assignments.)

Kevin

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