From patchwork Wed Apr 27 11:04:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 11904 Received: (qmail 38698 invoked by alias); 27 Apr 2016 11:16:08 -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 9452 invoked by uid 89); 27 Apr 2016 11:12:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*o:Research X-HELO: e06smtp13.uk.ibm.com Received: from e06smtp13.uk.ibm.com (HELO e06smtp13.uk.ibm.com) (195.75.94.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 27 Apr 2016 11:12:03 +0000 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 27 Apr 2016 12:12:00 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 27 Apr 2016 12:11:52 +0100 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: arnez@linux.vnet.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 3785631300BC for ; Wed, 27 Apr 2016 12:05:32 +0100 (BST) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u3RB4fQL6095340 for ; Wed, 27 Apr 2016 11:04:41 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u3RB4elG015801 for ; Wed, 27 Apr 2016 07:04:40 -0400 Received: from oc1027705133.ibm.com (dyn-9-152-212-143.boeblingen.de.ibm.com [9.152.212.143]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u3RB4egb015754 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 27 Apr 2016 07:04:40 -0400 From: Andreas Arnez To: gdb-patches@sourceware.org Subject: [PATCH] Avoid non-C++-enabled babeltrace versions Date: Wed, 27 Apr 2016 13:04:39 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16042711-0013-0000-0000-00000F0712C4 X-IsSubscribed: yes In some babeltrace versions before 1.2.0, the header file iterator.h is not fully enabled for use from C++, since it contains an anonymous enum in a struct declaration. This is fixed in later babeltrace versions: https://lists.lttng.org/pipermail/lttng-dev/2013-September/021411.html Now that GDB is compiled with C++, the GDB build fails on a system with such a babeltrace version: the compiler complains about a missing declaration of BT_SEEK_BEGIN in ctf.c. This patch enhances the configure check to recognize such babeltrace versions as unusable for GDB. gdb/ChangeLog: * configure.ac: Enhance configure check for babeltrace to reject non-C++-enabled versions. * configure: Regenerate. --- gdb/configure | 1 + gdb/configure.ac | 1 + 2 files changed, 2 insertions(+) diff --git a/gdb/configure b/gdb/configure index 3cf95e7..228cb99 100755 --- a/gdb/configure +++ b/gdb/configure @@ -16390,6 +16390,7 @@ struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); struct bt_ctf_event *event = NULL; const struct bt_definition *scope; + pos.type = BT_SEEK_BEGIN; bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); scope = bt_ctf_get_top_level_scope (event, BT_STREAM_EVENT_HEADER); diff --git a/gdb/configure.ac b/gdb/configure.ac index 70452d3..3aa132a 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -2286,6 +2286,7 @@ else struct bt_ctf_event *event = NULL; const struct bt_definition *scope; + pos.type = BT_SEEK_BEGIN; bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); scope = bt_ctf_get_top_level_scope (event, BT_STREAM_EVENT_HEADER);