chiark / gitweb /
gdb: Fix build on x86_64
authorFredrik Fornwall <fredrik@fornwall.net>
Fri, 17 Jun 2016 21:09:18 +0000 (17:09 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Fri, 17 Jun 2016 21:09:18 +0000 (17:09 -0400)
packages/gdb/bfd-hosts-x86-64linux.h.patch [new file with mode: 0644]
packages/gdb/gdb-amd64-linux-nat.c.patch [new file with mode: 0644]

diff --git a/packages/gdb/bfd-hosts-x86-64linux.h.patch b/packages/gdb/bfd-hosts-x86-64linux.h.patch
new file mode 100644 (file)
index 0000000..ca37b37
--- /dev/null
@@ -0,0 +1,19 @@
+diff -u -r ../gdb-7.11.1/bfd/hosts/x86-64linux.h ./bfd/hosts/x86-64linux.h
+--- ../gdb-7.11.1/bfd/hosts/x86-64linux.h      2016-02-09 22:19:39.000000000 -0500
++++ ./bfd/hosts/x86-64linux.h  2016-06-17 16:57:30.815715258 -0400
+@@ -32,6 +32,15 @@
+ /* We define here only the symbols differing from their 64-bit variant.  */
+ #include <sys/procfs.h>
++#ifdef __ANDROID__
++struct elf_siginfo {
++      int si_signo;
++      int si_code;
++      int si_errno;
++};
++#define ELF_PRARGSZ (80)
++#endif
++
+ #ifdef HAVE_STDINT_H
+ #include <stdint.h>
+ #else
diff --git a/packages/gdb/gdb-amd64-linux-nat.c.patch b/packages/gdb/gdb-amd64-linux-nat.c.patch
new file mode 100644 (file)
index 0000000..dca2b9c
--- /dev/null
@@ -0,0 +1,14 @@
+diff -u -r ../gdb-7.11.1/gdb/amd64-linux-nat.c ./gdb/amd64-linux-nat.c
+--- ../gdb-7.11.1/gdb/amd64-linux-nat.c        2016-02-09 22:19:39.000000000 -0500
++++ ./gdb/amd64-linux-nat.c    2016-06-17 17:06:35.515474250 -0400
+@@ -272,8 +272,10 @@
+ #endif
+       /* FIXME: ezannoni-2003-07-09 see comment above about include
+        file order.  We could be getting bogus values for these two.  */
++#ifndef __ANDROID__
+       gdb_assert (FS < ELF_NGREG);
+       gdb_assert (GS < ELF_NGREG);
++#endif
+       switch (idx)
+       {
+       case FS: