Fix compilation of gdb/arm-linux-nat.c on Raspbian GNU/Linux 7
authorMartin Simmons <martin@lispworks.com>
Tue, 16 Jun 2015 08:32:47 +0000 (09:32 +0100)
committerYao Qi <yao.qi@linaro.org>
Tue, 16 Jun 2015 08:42:53 +0000 (09:42 +0100)
GDB trunk 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.

2015-06-16  Martin Simmons  <martin@lispworks.com>  (tiny patch)

* arm-linux-nat.c: Include nat/linux-ptrace.h.

gdb/ChangeLog
gdb/arm-linux-nat.c

index 1828ae69b1b4fc1ce8977c58c95398647d1251f2..556fbae856354e04d678e77bcb8ff547c1e38556 100644 (file)
@@ -1,3 +1,7 @@
+2015-06-16  Martin Simmons  <martin@lispworks.com>  (tiny patch)
+
+       * arm-linux-nat.c: Include nat/linux-ptrace.h.
+
 2015-06-15  Simon Marchi  <simon.marchi@ericsson.com>
 
        * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Consider addressable
index b18d4437219bdf0e9e901872c742a0db4ce0d612..10aea076d3db728bba0f230f876d0970dec8f2e6 100644 (file)
@@ -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"
 
This page took 0.028937 seconds and 4 git commands to generate.