From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by sourceware.org (Postfix) with ESMTPS id 7D2743851C0C for ; Tue, 26 May 2020 16:05:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7D2743851C0C Received: by mail-qv1-xf42.google.com with SMTP id z9so9636304qvi.12 for ; Tue, 26 May 2020 09:05:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hme7Bs57cetZlH+RYGnLxGGffl1zNFECY+HKLT7FBCw=; b=iL1Vuxe67J7xoLO0txzQNEmwmTsQ9SCtNBj2qmHs4AbPcYjXypaKztd4Nd2tzvTFZA H2AAIM0Kru4pDKcUIRLFBBAsV03oeHzeFjhyhLuhGdWkhxGO3yWLu0fXvu5s3+BMNPmz ARfcPyGOEjHf+0ZMSZdg4uboseo+mSb7Qnddem6F5V+F640IBr7lDmnpkXNQmabPgpZo +dJIE3/oQUE/S3ggvQ2dX3zvMKDQTVuFMh/DHNBc0Ti5NhcA2BtrDCP2ZrcffP1wSEnD OGX5cja4LHZHthQArfhtZE3c6/1QDEX5afQpSToRmzhCBG2VH/RG/ktPWiIqWI4as7F4 p6sw== X-Gm-Message-State: AOAM532kZn7zt6rfPDUGjNMIV/KFRAR370Qn7xHD7NbVb6148EGhy9mZ UY2zB3USU+K2nmBfTNbZMYCNOtARL/8MpNt2o9gNtQ== X-Google-Smtp-Source: ABdhPJy0u3I4uiB2pHHloXVGe/ymnc3yUhHwbTR2OtV15ofyvh2VNaHO0e+rX/pY1ppUAtH+8ekvhThF5F4KVYVL6X4= X-Received: by 2002:a0c:8426:: with SMTP id l35mr20775688qva.223.1590509155657; Tue, 26 May 2020 09:05:55 -0700 (PDT) MIME-Version: 1.0 References: <20200525185659.59346-1-ssbssa@yahoo.de> <20200525185659.59346-3-ssbssa@yahoo.de> In-Reply-To: <20200525185659.59346-3-ssbssa@yahoo.de> From: Christian Biesinger Date: Tue, 26 May 2020 11:05:17 -0500 Message-ID: Subject: Re: [PATCH 2/7] Handle Windows drives in auto-load script paths To: Hannes Domani Cc: gdb-patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-25.8 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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:05:57 -0000 On Mon, May 25, 2020 at 1:57 PM 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. How does this work? I thought /c/foo was not supported by either cygwin or mingw? Christian > 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; > + } > + > for (const gdb::unique_xmalloc_ptr &dir : vec) > { > /* FILENAME is absolute, so we don't need a "/" here. */ > -- > 2.26.2 >