From patchwork Tue Apr 21 21:41:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 463498 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 717C01400DE for ; Wed, 22 Apr 2015 07:42:20 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=iyhNJykh; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=Pn7Kr+09JCqIFCKEi0IzJdV9uPm0LR1OU5piUfuSWIBD5Hc6a907y MXaD/L/OF4+baETpI1S8ZU+qYhmV8eH7n4cUWsz1BZb7/L9wXgSBjooY5e/BfRxn IqDM6QvRp427TYqJRQTY8yMOUkDGeLR/blQIAs9/IVDV5k48H5ckGg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=default; bh=GgWSL9LJBPb/iD5enywDArI/e44=; b=iyhNJykhiXHclhYXGrIrxAX/y3qT 74DHXdekTSFhsosOUmCaRzDogQFvqZXpA4KnhaPp71TROnJZ8Ir1TNhuAAIqd5iw /fbvI1c/ikJRE/k/fx6cHBEi6nR93Sw95EV0UYtnomu7CeJwhSiyHoDVZqydHPxF 22gnD5Q/vs8frXQ= Received: (qmail 12362 invoked by alias); 21 Apr 2015 21:41:43 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 12296 invoked by uid 89); 21 Apr 2015 21:41:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 21 Apr 2015 21:41:41 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id BA3CC8E704 for ; Tue, 21 Apr 2015 21:41:40 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3LLfdVJ006717; Tue, 21 Apr 2015 17:41:39 -0400 Subject: [PATCH 5/5] libcc1: 'set debug compile': Display absolute GCC driver filename From: Jan Kratochvil To: gcc-patches@gcc.gnu.org Cc: Phil Muldoon Date: Tue, 21 Apr 2015 23:41:38 +0200 Message-ID: <20150421214138.14972.9843.stgit@host1.jankratochvil.net> In-Reply-To: <20150421214109.14972.34388.stgit@host1.jankratochvil.net> References: <20150421214109.14972.34388.stgit@host1.jankratochvil.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-IsSubscribed: yes Hi, with the patches so far after (gdb) set debug compile 1 one would get: searching for compiler matching regex ^(x86_64|i.86)(-[^-]*)?-linux(-gnu)?-gcc$ found compiler x86_64-unknown-linux-gnu-gcc But I believe it is more readable to see: searching for compiler matching regex ^(x86_64|i.86)(-[^-]*)?-linux(-gnu)?-gcc$ found compiler /usr/bin/x86_64-unknown-linux-gnu-gcc I do not think the change will have functionality impact, although the filename gets used even for executing the command. Jan libcc1/ChangeLog 2015-04-21 Jan Kratochvil * findcomp.cc: Include system.h. (search_dir): Return absolute filename. --- libcc1/findcomp.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcc1/findcomp.cc b/libcc1/findcomp.cc index f02b1df..5d49e29 100644 --- a/libcc1/findcomp.cc +++ b/libcc1/findcomp.cc @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "libiberty.h" #include "xregex.h" #include "findcomp.hh" +#include "system.h" class scanner { @@ -68,7 +69,7 @@ search_dir (const regex_t ®exp, const std::string &dir, std::string *result) { if (regexec (®exp, filename, 0, NULL, 0) == 0) { - *result = filename; + *result = dir + DIR_SEPARATOR + filename; return true; } }