From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sa-prd-fep-047.btinternet.com (mailomta8-sa.btinternet.com [213.120.69.14]) by sourceware.org (Postfix) with ESMTPS id 4157E3851C0C for ; Tue, 26 May 2020 16:04:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4157E3851C0C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=jon.turney@dronecode.org.uk Received: from sa-prd-rgout-005.btmx-prd.synchronoss.net ([10.2.38.8]) by sa-prd-fep-047.btinternet.com with ESMTP id <20200526160411.VNGC4071.sa-prd-fep-047.btinternet.com@sa-prd-rgout-005.btmx-prd.synchronoss.net>; Tue, 26 May 2020 17:04:11 +0100 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com X-Originating-IP: [86.159.36.222] X-OWM-Source-IP: 86.159.36.222 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduhedruddvvddgleegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecunecujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepgeeuhfekvdefieeghfehtdejheeigedthefhhfehfffgheehgedtffeljeetueeunecukfhppeekiedrudehledrfeeirddvvddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplgduledvrdduieekrddurdduudejngdpihhnvghtpeekiedrudehledrfeeirddvvddvpdhmrghilhhfrhhomhepoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqecuuefqffgjpeekuefkvffokffogfdprhgtphhtthhopeeoghgusgdqphgrthgthhgvshesshhouhhrtggvfigrrhgvrdhorhhgqedprhgtphhtthhopeeoshhssghsshgrseihrghhohhordguvgeq X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.117] (86.159.36.222) by sa-prd-rgout-005.btmx-prd.synchronoss.net (5.8.340) (authenticated as jonturney@btinternet.com) id 5E3A290C12CD8230; Tue, 26 May 2020 17:04:11 +0100 Subject: Re: [PATCH 2/7] Handle Windows drives in auto-load script paths To: Hannes Domani References: <20200525185659.59346-1-ssbssa@yahoo.de> <20200525185659.59346-3-ssbssa@yahoo.de> Cc: gdb-patches@sourceware.org From: Jon Turney Message-ID: <73d80a58-df3b-6a85-8709-f751e83ec5d5@dronecode.org.uk> Date: Tue, 26 May 2020 17:04:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200525185659.59346-3-ssbssa@yahoo.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, 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: Tue, 26 May 2020 16:04:13 -0000 On 25/05/2020 19:56, Hannes Domani via Gdb-patches wrote: > 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-05-25 Hannes Domani > > * auto-load.c (auto_load_objfile_script_1): Convert drive part > of debugfile path on Windows. > --- > gdb/auto-load.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/gdb/auto-load.c b/gdb/auto-load.c > index 99bd96b971..88221d9f3d 100644 > --- a/gdb/auto-load.c > +++ b/gdb/auto-load.c > @@ -784,6 +784,13 @@ auto_load_objfile_script_1 (struct objfile *objfile, const char *realname, > "scripts-directory' path \"%s\".\n"), > auto_load_dir); > > + /* Convert Windows debugfile path from c:/dir/file to /c/dir/file. */ > + if (HAS_DRIVE_SPEC (debugfile)) > + { > + debugfile_holder = STRIP_DRIVE_SPEC (debugfile); > + filename = std::string("/") + debugfile[0] + debugfile_holder; Is this kind of path transformation msys(2) specific? > + } > + > for (const gdb::unique_xmalloc_ptr &dir : vec) > { > /* FILENAME is absolute, so we don't need a "/" here. */ >