From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21203 invoked by alias); 10 Oct 2011 21:23:48 -0000 Received: (qmail 21190 invoked by uid 22791); 10 Oct 2011 21:23:47 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,TW_BT X-Spam-Check-By: sourceware.org Received: from mtagate1.uk.ibm.com (HELO mtagate1.uk.ibm.com) (194.196.100.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Oct 2011 21:23:31 +0000 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate1.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p9ALNTiL005007 for ; Mon, 10 Oct 2011 21:23:29 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9ALNT5G2273346 for ; Mon, 10 Oct 2011 22:23:29 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9ALNTTJ022021 for ; Mon, 10 Oct 2011 15:23:29 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p9ALNSjr021999; Mon, 10 Oct 2011 15:23:28 -0600 Message-Id: <201110102123.p9ALNSjr021999@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 10 Oct 2011 23:23:28 +0200 Subject: Re: [patch] Verify byte-by-byte if both files are the same on "remote:" [Re: [rfc] False separate debuginfo warning with "remot To: jan.kratochvil@redhat.com (Jan Kratochvil) Date: Mon, 10 Oct 2011 21:23:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20111010202141.GA27651@host1.jankratochvil.net> from "Jan Kratochvil" at Oct 10, 2011 10:21:42 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00287.txt.bz2 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. Thanks, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com