From b8ae02c5ff75edb638ab67e487227973bc34fb2f Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 8 Mar 2015 18:11:49 +0100 Subject: add support for gdbserver on AVR32 devices Happily I got the old gdb tarball from buildroot source repository. (thx Yann) Mirror the package and make it compile for native gdbserver. Patches need to be shuffled to version directories. --- .../patches/7.8.2/patch-gdb_common_linux-ptrace_c | 10 ++++++++++ .../patches/7.8.2/patch-gdb_common_linux-ptrace_h | 11 +++++++++++ .../patches/7.8.2/patch-gdb_gdbserver_linux-low_c | 22 ++++++++++++++++++++++ .../patches/patch-gdb_common_linux-ptrace_c | 10 ---------- .../patches/patch-gdb_common_linux-ptrace_h | 11 ----------- .../patches/patch-gdb_gdbserver_linux-low_c | 22 ---------------------- 6 files changed, 43 insertions(+), 43 deletions(-) create mode 100644 package/gdbserver/patches/7.8.2/patch-gdb_common_linux-ptrace_c create mode 100644 package/gdbserver/patches/7.8.2/patch-gdb_common_linux-ptrace_h create mode 100644 package/gdbserver/patches/7.8.2/patch-gdb_gdbserver_linux-low_c delete mode 100644 package/gdbserver/patches/patch-gdb_common_linux-ptrace_c delete mode 100644 package/gdbserver/patches/patch-gdb_common_linux-ptrace_h delete mode 100644 package/gdbserver/patches/patch-gdb_gdbserver_linux-low_c (limited to 'package/gdbserver/patches') diff --git a/package/gdbserver/patches/7.8.2/patch-gdb_common_linux-ptrace_c b/package/gdbserver/patches/7.8.2/patch-gdb_common_linux-ptrace_c new file mode 100644 index 000000000..aec39df40 --- /dev/null +++ b/package/gdbserver/patches/7.8.2/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 + #endif + ++#include + #include "linux-ptrace.h" + #include "linux-procfs.h" + #include "nat/linux-waitpid.h" diff --git a/package/gdbserver/patches/7.8.2/patch-gdb_common_linux-ptrace_h b/package/gdbserver/patches/7.8.2/patch-gdb_common_linux-ptrace_h new file mode 100644 index 000000000..1f8e5b9b4 --- /dev/null +++ b/package/gdbserver/patches/7.8.2/patch-gdb_common_linux-ptrace_h @@ -0,0 +1,11 @@ +--- gdb-7.8.orig/gdb/common/linux-ptrace.h 2014-07-29 14:37:42.000000000 +0200 ++++ gdb-7.8/gdb/common/linux-ptrace.h 2014-10-04 08:25:08.000000000 +0200 +@@ -23,7 +23,7 @@ struct buffer; + #include + + #ifdef __UCLIBC__ +-#if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__)) ++#if !defined(__UCLIBC_HAS_MMU__) + /* PTRACE_TEXT_ADDR and friends. */ + #include + #define HAS_NOMMU diff --git a/package/gdbserver/patches/7.8.2/patch-gdb_gdbserver_linux-low_c b/package/gdbserver/patches/7.8.2/patch-gdb_gdbserver_linux-low_c new file mode 100644 index 000000000..ccb61c3a0 --- /dev/null +++ b/package/gdbserver/patches/7.8.2/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) diff --git a/package/gdbserver/patches/patch-gdb_common_linux-ptrace_c b/package/gdbserver/patches/patch-gdb_common_linux-ptrace_c deleted file mode 100644 index aec39df40..000000000 --- a/package/gdbserver/patches/patch-gdb_common_linux-ptrace_c +++ /dev/null @@ -1,10 +0,0 @@ ---- 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 - #endif - -+#include - #include "linux-ptrace.h" - #include "linux-procfs.h" - #include "nat/linux-waitpid.h" diff --git a/package/gdbserver/patches/patch-gdb_common_linux-ptrace_h b/package/gdbserver/patches/patch-gdb_common_linux-ptrace_h deleted file mode 100644 index 1f8e5b9b4..000000000 --- a/package/gdbserver/patches/patch-gdb_common_linux-ptrace_h +++ /dev/null @@ -1,11 +0,0 @@ ---- gdb-7.8.orig/gdb/common/linux-ptrace.h 2014-07-29 14:37:42.000000000 +0200 -+++ gdb-7.8/gdb/common/linux-ptrace.h 2014-10-04 08:25:08.000000000 +0200 -@@ -23,7 +23,7 @@ struct buffer; - #include - - #ifdef __UCLIBC__ --#if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__)) -+#if !defined(__UCLIBC_HAS_MMU__) - /* PTRACE_TEXT_ADDR and friends. */ - #include - #define HAS_NOMMU diff --git a/package/gdbserver/patches/patch-gdb_gdbserver_linux-low_c b/package/gdbserver/patches/patch-gdb_gdbserver_linux-low_c deleted file mode 100644 index ccb61c3a0..000000000 --- a/package/gdbserver/patches/patch-gdb_gdbserver_linux-low_c +++ /dev/null @@ -1,22 +0,0 @@ ---- 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) -- cgit v1.2.3