From patchwork Mon Jun 15 12:43:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Simmons X-Patchwork-Id: 7182 Received: (qmail 11003 invoked by alias); 15 Jun 2015 12:43:52 -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 10157 invoked by uid 89); 15 Jun 2015 12:43:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: lwfs1-cam.cam.lispworks.com Received: from mail.lispworks.com (HELO lwfs1-cam.cam.lispworks.com) (46.17.166.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 15 Jun 2015 12:43:51 +0000 Received: from heapu.cam.lispworks.com (heapu.cam.lispworks.com [192.168.1.71]) by lwfs1-cam.cam.lispworks.com (8.14.5/8.14.5) with ESMTP id t5FChjo4025733; Mon, 15 Jun 2015 13:43:45 +0100 (BST) (envelope-from martin@lispworks.com) Received: from heapu.cam.lispworks.com (localhost.localdomain [127.0.0.1]) by heapu.cam.lispworks.com (8.14.4) id t5FChjXj012725; Mon, 15 Jun 2015 13:43:45 +0100 Received: (from martin@localhost) by heapu.cam.lispworks.com (8.14.4/8.14.4/Submit) id t5FChjwS012722; Mon, 15 Jun 2015 13:43:45 +0100 Date: Mon, 15 Jun 2015 13:43:45 +0100 Message-Id: <201506151243.t5FChjwS012722@heapu.cam.lispworks.com> From: Martin Simmons To: gdb-patches@sourceware.org Subject: [PATCH] Fix compilation of gdb/arm-linux-nat.c on Raspbian GNU/Linux 7 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Revision 1e5338b6e7405acdd1e1d0eab46682bd1af007d5 fails to compile on Raspbian GNU/Linux 7 because PTRACE_GETREGSET and PTRACE_SETREGSET are not defined in sys/ptrace.h. gcc -g -O2 -I. -I. -I./common -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I./../zlib -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wpointer-sign -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -Werror -c -o arm-linux-nat.o -MT arm-linux-nat.o -MMD -MP -MF .deps/arm-linux-nat.Tpo arm-linux-nat.c arm-linux-nat.c: In function ‘fetch_fpregister’: arm-linux-nat.c:103:21: error: ‘PTRACE_GETREGSET’ undeclared (first use in this function) arm-linux-nat.c:103:21: note: each undeclared identifier is reported only once for each function it appears in arm-linux-nat.c: In function ‘fetch_fpregs’: arm-linux-nat.c:144:21: error: ‘PTRACE_GETREGSET’ undeclared (first use in this function) arm-linux-nat.c: In function ‘store_fpregister’: arm-linux-nat.c:184:21: error: ‘PTRACE_GETREGSET’ undeclared (first use in this function) arm-linux-nat.c:211:21: error: ‘PTRACE_SETREGSET’ undeclared (first use in this function) ... This patch includes the gdb header file nat/linux-ptrace.h, which provides fallback definitions. gdb/ChangeLog * arm-linux-nat.c (nat/linux-ptrace.h): New include for PTRACE_GETREGSET et al in case of old system header files. diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index b18d443..10aea07 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c @@ -36,6 +36,8 @@ #include #include +#include "nat/linux-ptrace.h" + /* Prototypes for supply_gregset etc. */ #include "gregset.h"