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: separated debuginfo patch


Hi Philippe,

  Sorry for the long delay in replying - I have been very busy over
  the last few weeks.


> I need to know how GDB guys want I deal with the gdb part, for now
> gdb.diff just remove (#if 0) all duplicated code from bfd and use
> bfd_follow_gnu_debuglink() to retrieve the debug info file. Is it
> ok to remove this code or must I update the duplicated code according
> to the change in bfd ?

  Well this is up to the gdb maintainers to decide, but it certainly
  seems like a good idea to avoid the code duplication.


> > We just need to agree on the format and name of the timestamp
> > section in the debuginfo file, and how to distinguish old
> > .gnu-debuglink sections (only containing a crc) from new ones
> > (containing a crc and a timestamp).
> 
> I disambiguate the two case by looking the section size. See
> bfd.diff, it's a bit ugly but I don't see how I can deal cleanly
> with this problem.

Actually I rather like this solution.  Adding the timestamp as an
extra field at the end of the .gnu-debuglink section seems rather
elegant and it eliminates the need for a new section.

Some comments on the patch:
      
> + #define GNU_DEBUGLINK_TIMESTAMP ".gnu_debuglink_timestamp"

This is not needed, since the timestamp is going to be held in the
.gnu-debuglink section.


>   INTERNAL_FUNCTION
> + 	bfd_get_debug_timestamp_info
> + 
> + SYNOPSIS
> + 	bfd_boolean bfd_get_debug_timestamp_info
> + 	  (bfd *abfd, unsigned long *timestamp);
> + 
> + DESCRIPTION
> + 	fetch the timestamp for any separate debuginfo associated with
> + 	@var{abfd}.

Similarly this function should extract the timestamp from the
.gnu-debuglink section.


> +   printf("try %s %ld\n", name, timestamp);

I assume that this is left over debugging ?

> !   debuglink_size += 8;

We ought to add a comment explaining why the value 8 is used here.


Overall though I like the patch and the solution.  If we can get the
GDB maintainers to agree (or at least not object to) adding the extra
field at the end of the .gnu-debuglink section then I would be happy
to review a final version of the patch.  (Note - you will need a FSF
copyright assignment as well...)

Cheers
        Nick


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