From patchwork Wed Aug 23 04:18:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Durigan Junior X-Patchwork-Id: 22326 Received: (qmail 94752 invoked by alias); 23 Aug 2017 04:18:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 94657 invoked by uid 89); 23 Aug 2017 04:18:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 ESMTP; Wed, 23 Aug 2017 04:18:27 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 091977F6BA; Wed, 23 Aug 2017 04:18:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 091977F6BA Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=sergiodj@redhat.com Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D525967C8D; Wed, 23 Aug 2017 04:18:25 +0000 (UTC) From: Sergio Durigan Junior To: GDB Patches , GCC Patches Cc: Tom Tromey , Keith Seitz , Phil Muldoon , Alexandre Oliva Subject: [PATCH 2/2] [GDB] Add trailing dash on triplet regexp In-Reply-To: <87mv6qhq9u.fsf@redhat.com> References: <87mv6qhq9u.fsf@redhat.com> X-URL: https://sergiodj.net Date: Wed, 23 Aug 2017 00:18:25 -0400 Message-ID: <87k21uhq7i.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes This is the GDB patch. It is very simple, and just a necessary adjustment needed because of the modifications made in the "make_regexp" functions on libcc1. Now, GDB will provide a full regexp for triplet names, including the trailing dash ("-"). Therefore, we will have a regexp that truly matches the full triplet (e.g., "^(x86_64|i.86)(-[^-]*)?-linux(-gnu)?-") instead of one that leaves the trailing "-" match to libcc1. OK to apply? diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c index 91e084f89f..0ce77a8b95 100644 --- a/gdb/compile/compile.c +++ b/gdb/compile/compile.c @@ -509,7 +509,7 @@ compile_to_object (struct command_line *cmd, const char *cmd_string, arch_rx = gdbarch_gnu_triplet_regexp (gdbarch); /* Allow triplets with or without vendor set. */ - triplet_rx = concat (arch_rx, "(-[^-]*)?-", os_rx, (char *) NULL); + triplet_rx = concat (arch_rx, "(-[^-]*)?-", os_rx, "-", (char *) NULL); make_cleanup (xfree, triplet_rx); /* Set compiler command-line arguments. */