From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22711 invoked by alias); 18 Jan 2013 21:53:19 -0000 Received: (qmail 22700 invoked by uid 22791); 18 Jan 2013 21:53:16 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Jan 2013 21:53:09 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0ILr6BE016155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 Jan 2013 16:53:07 -0500 Received: from host2.jankratochvil.net (ovpn-116-19.ams2.redhat.com [10.36.116.19]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0ILA2P1031570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 18 Jan 2013 16:10:07 -0500 Date: Fri, 18 Jan 2013 21:53:00 -0000 From: Jan Kratochvil To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [patch 2/9] Code cleanup: Drop IS_ABSOLUTE_PATH checks Message-ID: <20130118211002.GA9261@host2.jankratochvil.net> References: <20130117215846.GC16249@host2.jankratochvil.net> <83fw1z6j5i.fsf@gnu.org> <20130118183938.GA1255@host2.jankratochvil.net> <83r4li5mdj.fsf@gnu.org> <20130118193457.GA4369@host2.jankratochvil.net> <83mww65iok.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83mww65iok.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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: 2013-01/txt/msg00459.txt.bz2 On Fri, 18 Jan 2013 21:40:11 +0100, Eli Zaretskii wrote: > I'm saying that your addition of IS_ABSOLUTE_PATH to the test above > might fail file-name comparisons where they previously succeeded, and > for reasons that seem wrong to me. Could you give an example? Previously it was forbidden/unspecified what happens when you call compare_filenames_for_search with IS_ABSOLUTE_PATH (search_name). > IOW, I simply don't see why the test for IS_ABSOLUTE_PATH should be > added there. What exactly would go wrong if you don't add it? When you revert this change: - || IS_DIR_SEPARATOR (filename[len - search_len - 1]) + || (!IS_ABSOLUTE_PATH (search_name) + && IS_DIR_SEPARATOR (filename[len - search_len - 1])) then the new testcase FAILs +mi_gdb_test "-break-insert -t /$srcfile:main" \ + "\\^error,msg=\"No source file named /[string_to_regexp $srcfile]\\.\"" \ + "compare_filenames_for_search does not match" because the breakpoint will be placed there, it should not (error is expected and correct). I hope we agree that placing a breakpoint to /filename.c:main should not be successful even if one of the source files is named: /path/to//filename.c Thanks, Jan