From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32204 invoked by alias); 18 Jan 2013 07:32:28 -0000 Received: (qmail 32192 invoked by uid 22791); 18 Jan 2013 07:32:27 -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 mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Jan 2013 07:32:21 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MGT00H008TVFC00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Fri, 18 Jan 2013 09:32:18 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGT00HNN8XUBC50@a-mtaout21.012.net.il>; Fri, 18 Jan 2013 09:32:18 +0200 (IST) Date: Fri, 18 Jan 2013 07:32:00 -0000 From: Eli Zaretskii Subject: Re: [patch 2/9] Code cleanup: Drop IS_ABSOLUTE_PATH checks In-reply-to: <20130117215846.GC16249@host2.jankratochvil.net> To: Jan Kratochvil Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83fw1z6j5i.fsf@gnu.org> References: <20130117215846.GC16249@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/msg00403.txt.bz2 > Date: Thu, 17 Jan 2013 22:58:46 +0100 > From: Jan Kratochvil > > compare_filenames_for_search did not support IS_ABSOLUTE_PATH search_name and > therefore all its callers had to handle such case specially. What code in compare_filenames_for_search would not DTRT with absolute file names? > int > compare_filenames_for_search (const char *filename, const char *search_name) > @@ -171,7 +171,8 @@ compare_filenames_for_search (const char *filename, const char *search_name) > to put the "c:file.c" name into debug info. Such compatibility > works only on GDB built for DOS host. */ > return (len == search_len > - || IS_DIR_SEPARATOR (filename[len - search_len - 1]) > + || (!IS_ABSOLUTE_PATH (search_name) > + && IS_DIR_SEPARATOR (filename[len - search_len - 1])) > || (HAS_DRIVE_SPEC (filename) > && STRIP_DRIVE_SPEC (filename) == &filename[len - search_len])); > } I don't understand why the "match up to a slash" rule is now limited to non-absolute file names. Perhaps this is related to my first question above. Thanks.