From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11286 invoked by alias); 19 Jan 2013 06:50:14 -0000 Received: (qmail 11270 invoked by uid 22791); 19 Jan 2013 06:50:12 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 19 Jan 2013 06:50:07 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MGV00A001LPJG00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Sat, 19 Jan 2013 08:50:05 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGV00A7B1NHAE70@a-mtaout20.012.net.il>; Sat, 19 Jan 2013 08:50:05 +0200 (IST) Date: Sat, 19 Jan 2013 06:50:00 -0000 From: Eli Zaretskii Subject: Re: [patch 2/9] Code cleanup: Drop IS_ABSOLUTE_PATH checks In-reply-to: <20130118211002.GA9261@host2.jankratochvil.net> To: Jan Kratochvil Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83d2x1r7iy.fsf@gnu.org> 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> <20130118211002.GA9261@host2.jankratochvil.net> 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/msg00461.txt.bz2 > Date: Fri, 18 Jan 2013 22:10:02 +0100 > From: Jan Kratochvil > Cc: gdb-patches@sourceware.org > > 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). Any absolute file name would be an example. > 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 Yes, we do. But IS_ABSOLUTE_PATH tests more than just whether there's a slash at the beginning of "/filename.c". I'm saying we should test explicitly for the slash, not for the file name being absolute. IOW, using IS_ABSOLUTE_PATH here obfuscates the real intent of the code.