From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qmxOGkewNmBIHwAAWB0awg (envelope-from ) for ; Wed, 24 Feb 2021 15:00:07 -0500 Received: by simark.ca (Postfix, from userid 112) id 3C2BA1EF78; Wed, 24 Feb 2021 15:00:07 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 00C7B1E789 for ; Wed, 24 Feb 2021 15:00:05 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4AFED395540E; Wed, 24 Feb 2021 20:00:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4AFED395540E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614196805; bh=KiiZrHwK05zJEa3MicCC8A5avZotQLFBpWzvUL8Zco0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ouQFBQ9rZ7sCJ1Q0oKTFF+D3FhnSCu0jV0OHLBDDuM0WUFLtYdYLzNKrSeijS583g /Piv7JNgWeIDCeeiWYzLX4fwK2O6vi57vxCcE77IKKconut2jGShgsxMF/+uGasjY4 8Cp91F56XmPEmcrCv607oXRRV14q+4k8GolkP7Ns= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 0F15A3857C62 for ; Wed, 24 Feb 2021 19:59:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0F15A3857C62 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-499-kT_SugyUPpWuuIS3371yfA-1; Wed, 24 Feb 2021 14:59:55 -0500 X-MC-Unique: kT_SugyUPpWuuIS3371yfA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE3CA107ACC7 for ; Wed, 24 Feb 2021 19:59:54 +0000 (UTC) Received: from f33-1.lan (ovpn-112-229.phx2.redhat.com [10.3.112.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4B9B19C71; Wed, 24 Feb 2021 19:59:54 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [pushed] Fix aarch64-linux-hw-point.c build problem Date: Wed, 24 Feb 2021 12:59:45 -0700 Message-Id: <20210224195945.2135883-1-kevinb@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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: , From: Kevin Buettner via Gdb-patches Reply-To: Kevin Buettner Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Due to a recent glibc header file change, the file nat/aarch64-linux-hw-point.c no longer builds on Fedora rawhide. An enum for PTRACE_SYSEMU is now provided by . In the past, PTRACE_SYSEMU was defined only in . This is what it looks like... In : #define PTRACE_SYSEMU 31 In : enum __ptrace_request { ... PTRACE_SYSEMU = 31, #define PT_SYSEMU PTRACE_SYSEMU ... } When and are both included in a source file, we run into the following build problem when the former is included before the latter: In file included from nat/aarch64-linux-hw-point.c:26: /usr/include/sys/ptrace.h:86:3: error: expected identifier before numeric constant 86 | PTRACE_SYSEMU = 31, | ^~~~~~~~~~~~~ (There are more errors after this one too.) The file builds without error when is included after . I found that this is already done in nat/aarch64-sve-linux-ptrace.h (which is included by nat/aarch64-linux-ptrace.c). I've tested this change on Fedora rawhide and Fedora 33, both running on an aarch64 machine. gdb/ChangeLog: * nat/aarch64-linux-hw-point.c: Include after . --- gdb/ChangeLog | 5 +++++ gdb/nat/aarch64-linux-hw-point.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 00a71fe9025..f7052421935 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2021-02-24 Kevin Buettner + + * nat/aarch64-linux-hw-point.c: Include after + . + 2021-02-24 Andrew Burgess * exec.c (set_section_command): Move variable declarations into diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c index 73e4edd68cb..0278ac2bb28 100644 --- a/gdb/nat/aarch64-linux-hw-point.c +++ b/gdb/nat/aarch64-linux-hw-point.c @@ -23,8 +23,8 @@ #include "aarch64-linux-hw-point.h" #include -#include #include +#include #include /* Number of hardware breakpoints/watchpoints the target supports. -- 2.29.2