From: Martin Simmons <martin@lispworks.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] Fix compilation of gdb/arm-linux-nat.c on Raspbian GNU/Linux 7
Date: Mon, 15 Jun 2015 12:43:00 -0000 [thread overview]
Message-ID: <201506151243.t5FChjwS012722@heapu.cam.lispworks.com> (raw)
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 <sys/utsname.h>
#include <sys/procfs.h>
+#include "nat/linux-ptrace.h"
+
/* Prototypes for supply_gregset etc. */
#include "gregset.h"
next reply other threads:[~2015-06-15 12:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 12:43 Martin Simmons [this message]
2015-06-15 13:00 ` Yao Qi
2015-06-15 16:32 ` Martin Simmons
2015-06-16 8:42 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201506151243.t5FChjwS012722@heapu.cam.lispworks.com \
--to=martin@lispworks.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox