This is the mail archive of the 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: [patch] Verify byte-by-byte if both files are the same on "remote:" [Re: [rfc] False separate debuginfo warning with "remot

Jan Kratochvil wrote:
> On Mon, 10 Oct 2011 15:47:57 +0200, Ulrich Weigand wrote:
> > So this no longer handles the st_ino == 0 case.  I think we still need to do
> > that, to cope with filesystems (e.g. on Windows?) where stat works, but does
> > not provide inode numbers ...  Two files with zero st_ino should not be
> > considered equal.
> I believe the code is right.  st_ino == 0 will verified_as_different = 0,
> therefore this code does not make any assumption about such files.
> FYI I reordered the condition for some negligible btter performance.

Yes, you're right.  Sorry, I misread the original patch ...

> gdb/
> 2011-10-10  Jan Kratochvil  <>
> 	Fix separate debuginfo warning with "remote:" access.
> 	* objfiles.h (struct objfile): New fields crc32 and crc32_p.
> 	* symfile.c (get_file_crc): New function with the code moved from ...
> 	(separate_debug_file_exists): ... this function, specifically variables
> 	buffer and count.  New variable verified_as_different, set it.  Remove
> 	file_crc initialization.  Verify also if both files are not the same
> 	manually, if needed.

Looks good to me.


  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE

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