summaryrefslogtreecommitdiff
path: root/package/gdb
diff options
context:
space:
mode:
authorWaldemar Brodkorb <mail@waldemar-brodkorb.de>2013-10-26 23:38:30 +0200
committerWaldemar Brodkorb <mail@waldemar-brodkorb.de>2013-10-26 23:38:30 +0200
commit8b158037825699c4337eb0cb2911a289a47b25d5 (patch)
treeda1963ce6f4e919c3c59c315891ee2e6c2ab2c84 /package/gdb
parent46e9668e2aa3f125f6edbdf4d691675481373819 (diff)
fix x86_64 build with musl, from sabotage
Diffstat (limited to 'package/gdb')
-rw-r--r--package/gdb/patches/patch-gdb_amd64-linux-nat_c12
-rw-r--r--package/gdb/src/gdb/debugreg.h48
2 files changed, 58 insertions, 2 deletions
diff --git a/package/gdb/patches/patch-gdb_amd64-linux-nat_c b/package/gdb/patches/patch-gdb_amd64-linux-nat_c
index ac612d711..c50f1adf1 100644
--- a/package/gdb/patches/patch-gdb_amd64-linux-nat_c
+++ b/package/gdb/patches/patch-gdb_amd64-linux-nat_c
@@ -1,6 +1,6 @@
--- gdb-7.6.orig/gdb/amd64-linux-nat.c 2013-03-11 09:25:57.000000000 +0100
-+++ gdb-7.6/gdb/amd64-linux-nat.c 2013-09-04 13:29:05.000000000 +0200
-@@ -25,8 +25,6 @@
++++ gdb-7.6/gdb/amd64-linux-nat.c 2013-10-26 22:30:11.000000000 +0200
+@@ -25,15 +25,13 @@
#include "regset.h"
#include "linux-nat.h"
#include "amd64-linux-tdep.h"
@@ -9,6 +9,14 @@
#include "gdb_assert.h"
#include "gdb_string.h"
+ #include "elf/common.h"
+ #include <sys/uio.h>
+ #include <sys/ptrace.h>
+-#include <sys/debugreg.h>
++#include "debugreg.h"
+ #include <sys/syscall.h>
+ #include <sys/procfs.h>
+ #include <sys/user.h>
@@ -1121,47 +1119,6 @@ amd64_linux_read_description (struct tar
}
}
diff --git a/package/gdb/src/gdb/debugreg.h b/package/gdb/src/gdb/debugreg.h
new file mode 100644
index 000000000..e4883c804
--- /dev/null
+++ b/package/gdb/src/gdb/debugreg.h
@@ -0,0 +1,48 @@
+#ifndef SYS_DEBUGREG_H
+#define SYS_DEBUGREG_H
+
+#include <stdint.h>
+
+#define DR_FIRSTADDR 0
+#define DR_LASTADDR 3
+
+#define DR_STATUS 6
+#define DR_CONTROL 7
+
+#define DR_TRAP0 (0x1)
+#define DR_TRAP1 (0x2)
+#define DR_TRAP2 (0x4)
+#define DR_TRAP3 (0x8)
+
+#define DR_STEP (0x4000)
+#define DR_SWITCH (0x8000)
+
+#define DR_CONTROL_SHIFT 16
+#define DR_CONTROL_SIZE 4
+
+#define DR_RW_EXECUTE (0x0)
+#define DR_RW_WRITE (0x1)
+#define DR_RW_READ (0x3)
+
+#define DR_LEN_1 (0x0)
+#define DR_LEN_2 (0x4)
+#define DR_LEN_4 (0xC)
+#define DR_LEN_8 (0x8)
+
+#define DR_LOCAL_ENABLE_SHIFT 0
+#define DR_GLOBAL_ENABLE_SHIFT 1
+#define DR_ENABLE_SIZE 2
+
+#define DR_LOCAL_ENABLE_MASK (0x55)
+#define DR_GLOBAL_ENABLE_MASK (0xAA)
+
+
+#if SIZE_MAX > 4294967295
+# define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00UL)
+#else
+# define DR_CONTROL_RESERVED (0x00FC00U)
+#endif
+#define DR_LOCAL_SLOWDOWN (0x100)
+#define DR_GLOBAL_SLOWDOWN (0x200)
+
+#endif