From patchwork Tue Jan 17 12:14:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 18925 Received: (qmail 91705 invoked by alias); 17 Jan 2017 12:14:44 -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 91577 invoked by uid 89); 17 Jan 2017 12:14:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:10.10.0 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Jan 2017 12:14:32 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id BD16B81A19 for ; Tue, 17 Jan 2017 13:14:30 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NP9K_awxARiW for ; Tue, 17 Jan 2017 13:14:30 +0100 (CET) Received: from chelles.act-europe.fr (chelles.act-europe.fr [10.10.0.160]) by smtp.eu.adacore.com (Postfix) with ESMTP id AAE558169B for ; Tue, 17 Jan 2017 13:14:30 +0100 (CET) Received: by chelles.act-europe.fr (Postfix, from userid 507) id A4C5A1EA0067; Tue, 17 Jan 2017 13:14:30 +0100 (CET) From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFA] fix gdbserver build in nat/linux-ptrace.c on arm-android Date: Tue, 17 Jan 2017 13:14:16 +0100 Message-Id: <1484655256-31563-1-git-send-email-brobecker@adacore.com> Hello, The following change replaced an include of gregset.h by an include of : commit 39b22471578843019026c50fcdbe0483a6045970 Date: Thu Aug 11 12:01:22 2016 +0100 Subject: Fix fallout from gdb/20413's fix (x32: linux_ptrace_test_ret_to_nx: Cannot PTRACE_PEEKUSER) Unfortunately, this broke gdbserver on Android, because that file does not exist on this platform. This patch fixes the issue by conditionalizing its include with HAVE_SYS_PROCFS_H (which we check both in gdb/configure and gdbserver/configure). gdb/ChangeLog: * nat/linux-ptrace.c: Only include if HAVE_SYS_PROCFS_H is defined. Tested by rebuilding gdbserver on arm-android and GNU/Linux. OK to push? Thanks! diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c index 3447e07..3265b16 100644 --- a/gdb/nat/linux-ptrace.c +++ b/gdb/nat/linux-ptrace.c @@ -23,7 +23,9 @@ #include "buffer.h" #include "gdb_wait.h" #include "gdb_ptrace.h" +#ifdef HAVE_SYS_PROCFS_H #include +#endif /* Stores the ptrace options supported by the running kernel. A value of -1 means we did not check for features yet. A value