summaryrefslogtreecommitdiff
path: root/package/gdbserver/patches
diff options
context:
space:
mode:
Diffstat (limited to 'package/gdbserver/patches')
-rw-r--r--package/gdbserver/patches/patch-gdb_common_linux-ptrace_c10
-rw-r--r--package/gdbserver/patches/patch-gdb_gdbserver_linux-low_c22
2 files changed, 32 insertions, 0 deletions
diff --git a/package/gdbserver/patches/patch-gdb_common_linux-ptrace_c b/package/gdbserver/patches/patch-gdb_common_linux-ptrace_c
new file mode 100644
index 000000000..aec39df40
--- /dev/null
+++ b/package/gdbserver/patches/patch-gdb_common_linux-ptrace_c
@@ -0,0 +1,10 @@
+--- gdb-7.8.orig/gdb/common/linux-ptrace.c 2014-07-29 14:37:42.000000000 +0200
++++ gdb-7.8/gdb/common/linux-ptrace.c 2014-09-05 00:52:41.353409084 +0200
+@@ -23,6 +23,7 @@
+ #include <string.h>
+ #endif
+
++#include <sched.h>
+ #include "linux-ptrace.h"
+ #include "linux-procfs.h"
+ #include "nat/linux-waitpid.h"
diff --git a/package/gdbserver/patches/patch-gdb_gdbserver_linux-low_c b/package/gdbserver/patches/patch-gdb_gdbserver_linux-low_c
new file mode 100644
index 000000000..ccb61c3a0
--- /dev/null
+++ b/package/gdbserver/patches/patch-gdb_gdbserver_linux-low_c
@@ -0,0 +1,22 @@
+--- gdb-7.8.orig/gdb/gdbserver/linux-low.c 2014-07-29 14:37:42.000000000 +0200
++++ gdb-7.8/gdb/gdbserver/linux-low.c 2014-09-05 00:47:25.427321525 +0200
+@@ -4933,15 +4933,15 @@ static int
+ linux_read_offsets (CORE_ADDR *text_p, CORE_ADDR *data_p)
+ {
+ unsigned long text, text_end, data;
+- int pid = lwpid_of (get_thread_lwp (current_inferior));
++ int pid = lwpid_of (current_inferior);
+
+ errno = 0;
+
+- text = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) PT_TEXT_ADDR,
++ text = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) (PT_TEXT_ADDR),
+ (PTRACE_TYPE_ARG4) 0);
+- text_end = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) PT_TEXT_END_ADDR,
++ text_end = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) (PT_TEXT_END_ADDR),
+ (PTRACE_TYPE_ARG4) 0);
+- data = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) PT_DATA_ADDR,
++ data = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) (PT_DATA_ADDR),
+ (PTRACE_TYPE_ARG4) 0);
+
+ if (errno == 0)