This is the mail archive of the
mailing list for the GDB project.
Re: [patch] Verify byte-by-byte if both files are the same on "remote:" [Re: [rfc] False separate debuginfo warning with "remot
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: jan dot kratochvil at redhat dot com (Jan Kratochvil)
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 10 Oct 2011 23:23:28 +0200 (CEST)
- Subject: 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 ...
> 2011-10-10 Jan Kratochvil <firstname.lastname@example.org>
> 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