From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 5C9543858D34 for ; Wed, 8 Jul 2020 18:04:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5C9543858D34 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eliz@gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]:40850) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtEQk-0001J5-B5; Wed, 08 Jul 2020 14:04:26 -0400 Received: from [176.228.60.248] (port=2881 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jtEQc-0007iI-Pm; Wed, 08 Jul 2020 14:04:25 -0400 Date: Wed, 08 Jul 2020 21:04:28 +0300 Message-Id: <838sftrihf.fsf@gnu.org> From: Eli Zaretskii To: Hannes Domani Cc: gdb-patches@sourceware.org In-Reply-To: <20200708171957.15720-1-ssbssa@yahoo.de> (message from Hannes Domani on Wed, 8 Jul 2020 19:19:57 +0200) Subject: Re: [PATCH v3] Handle Windows drives in auto-load script paths References: <20200708171957.15720-1-ssbssa.ref@yahoo.de> <20200708171957.15720-1-ssbssa@yahoo.de> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 18:04:28 -0000 > From: Hannes Domani > Date: Wed, 8 Jul 2020 19:19:57 +0200 > > Fixes this testsuite fail on Windows: > FAIL: gdb.base/auto-load.exp: print $script_loaded > > Converts the debugfile path from c:/dir/file to /c/dir/file, so it can be > appended to the auto-load path. > > gdb/ChangeLog: > > 2020-07-08 Hannes Domani > > * auto-load.c (auto_load_objfile_script_1): Convert drive part > of debugfile path on Windows. > > gdb/doc/ChangeLog: > > 2020-07-08 Hannes Domani > > * gdb.texinfo: Document Windows drive conversion of > 'set auto-load scripts-directory'. This LGTM, as I said earlier. One minor aesthetic nit, though: > + debugfile_holder = STRIP_DRIVE_SPEC (debugfile); > + filename = std::string("/") + debugfile[0] + debugfile_holder; Perhaps it is slightly better to use "\\" here instead of "/", since on both sides of that "/D" thing all other separators are backslashes, so this forward slash looks like the odd one out. Thanks.