summaryrefslogtreecommitdiff
path: root/packages/gdb/7.10
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-05-20 04:58:46 (GMT)
committerAlexey Neyman <stilor@att.net>2017-07-08 17:57:56 (GMT)
commite7deac3aad394325f9e6fc6fda41d34ec94a59e0 (patch)
tree6ad88362f0bfa8385a91eb494009a4646aeb74b6 /packages/gdb/7.10
parentb9af225f58e45c7fae7eb9d3689fe939243e7578 (diff)
Switch comp.libs/tools and debug to new framework.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'packages/gdb/7.10')
-rw-r--r--packages/gdb/7.10/10-setns-handling.patch52
-rw-r--r--packages/gdb/7.10/100-musl_fix.patch28
-rw-r--r--packages/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch39
-rw-r--r--packages/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch35
-rw-r--r--packages/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch31
-rw-r--r--packages/gdb/7.10/version.desc1
6 files changed, 186 insertions, 0 deletions
diff --git a/packages/gdb/7.10/10-setns-handling.patch b/packages/gdb/7.10/10-setns-handling.patch
new file mode 100644
index 0000000..e2647ad
--- /dev/null
+++ b/packages/gdb/7.10/10-setns-handling.patch
@@ -0,0 +1,52 @@
+From 99fe86f7999afd2743b08c550b10f083ae4bd9bd Mon Sep 17 00:00:00 2001
+From: Peter Bergner <bergner@vnet.ibm.com>
+Date: Tue, 14 Jul 2015 10:46:16 -0500
+Subject: [PATCH] Fix build issue with nat/linux-namespaces.c.
+
+ * nat/linux-namespaces.c (setns): Rename from this ...
+ (do_setns): ... to this. Support calling setns if it exists.
+ (mnsh_handle_setns): Call do_setns.
+---
+ gdb/ChangeLog | 6 ++++++
+ gdb/nat/linux-namespaces.c | 12 ++++++------
+ 2 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/gdb/nat/linux-namespaces.c b/gdb/nat/linux-namespaces.c
+index a7a3e4d..fd0d4b0 100644
+--- a/gdb/nat/linux-namespaces.c
++++ b/gdb/nat/linux-namespaces.c
+@@ -34,18 +34,18 @@ int debug_linux_namespaces;
+
+ /* Handle systems without setns. */
+
+-#ifndef HAVE_SETNS
+-static int
+-setns (int fd, int nstype)
++static inline int
++do_setns (int fd, int nstype)
+ {
+-#ifdef __NR_setns
++#ifdef HAVE_SETNS
++ return setns (fd, nstype);
++#elif defined __NR_setns
+ return syscall (__NR_setns, fd, nstype);
+ #else
+ errno = ENOSYS;
+ return -1;
+ #endif
+ }
+-#endif
+
+ /* Handle systems without MSG_CMSG_CLOEXEC. */
+
+@@ -495,7 +495,7 @@ mnsh_recv_message (int sock, enum mnsh_msg_type *type,
+ static ssize_t
+ mnsh_handle_setns (int sock, int fd, int nstype)
+ {
+- int result = setns (fd, nstype);
++ int result = do_setns (fd, nstype);
+
+ return mnsh_return_int (sock, result, errno);
+ }
+--
+1.9.4
diff --git a/packages/gdb/7.10/100-musl_fix.patch b/packages/gdb/7.10/100-musl_fix.patch
new file mode 100644
index 0000000..c0c1e0a
--- /dev/null
+++ b/packages/gdb/7.10/100-musl_fix.patch
@@ -0,0 +1,28 @@
+--- a/gdb/linux-nat.c
++++ b/gdb/linux-nat.c
+@@ -17,6 +17,7 @@
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
++#include "stopcode.h"
+ #include "defs.h"
+ #include "inferior.h"
+ #include "infrun.h"
+@@ -73,6 +74,10 @@
+ #define SPUFS_MAGIC 0x23c9b64e
+ #endif
+
++#ifndef __SIGRTMIN
++#define __SIGRTMIN SIGRTMIN
++#endif
++
+ /* This comment documents high-level logic of this file.
+
+ Waiting for events in sync mode
+--- /dev/null
++++ b/gdb/stopcode.h
+@@ -0,0 +1,4 @@
++#ifndef W_STOPCODE
++#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
++#endif
++
diff --git a/packages/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch b/packages/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch
new file mode 100644
index 0000000..1182a45
--- /dev/null
+++ b/packages/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch
@@ -0,0 +1,39 @@
+From 7f8c0d8984bf5754807d3bb543cbc3ffc634e9e4 Mon Sep 17 00:00:00 2001
+From: Max Filippov <jcmvbkbc@gmail.com>
+Date: Sat, 30 May 2015 13:00:32 +0300
+Subject: [PATCH] xtensa: initialize call_abi in xtensa_tdep
+
+Use XSHAL_ABI value provided by xtensa-config.h to correctly initialize
+xtensa_tdep.call_abi
+This fixes calls to functions from GDB that otherwise fail with the
+following assertion in call0 configuration:
+
+ gdb/regcache.c:602: internal-error: regcache_raw_read: Assertion
+ `regnum >= 0 && regnum < regcache->descr->nr_raw_registers' failed.
+
+gdb/
+ * xtensa-tdep.h (XTENSA_GDBARCH_TDEP_INSTANTIATE): Initialize
+ call_abi using XSHAL_ABI macro.
+
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ gdb/xtensa-tdep.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h
+index adacaf8..3b6ea66 100644
+--- a/gdb/xtensa-tdep.h
++++ b/gdb/xtensa-tdep.h
+@@ -246,7 +246,8 @@ struct gdbarch_tdep
+ .spill_location = -1, \
+ .spill_size = (spillsz), \
+ .unused = 0, \
+- .call_abi = 0, \
++ .call_abi = (XSHAL_ABI == XTHAL_ABI_CALL0) ? \
++ CallAbiCall0Only : CallAbiDefault, \
+ .debug_interrupt_level = XCHAL_DEBUGLEVEL, \
+ .icache_line_bytes = XCHAL_ICACHE_LINESIZE, \
+ .dcache_line_bytes = XCHAL_DCACHE_LINESIZE, \
+--
+1.8.1.4
+
diff --git a/packages/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch b/packages/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch
new file mode 100644
index 0000000..982bd7f
--- /dev/null
+++ b/packages/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch
@@ -0,0 +1,35 @@
+From 208ea73d38c9c16cf983b6419f58050dbadcb6a9 Mon Sep 17 00:00:00 2001
+From: Max Filippov <jcmvbkbc@gmail.com>
+Date: Sun, 7 Jun 2015 22:43:49 +0300
+Subject: [PATCH 2/2] xtensa: make sure ar_base is initialized
+
+ar_base is uninitialized for cores w/o windowed registers as their
+regmap doesn't have register 0x0100.
+Check that ar_base is initialized and if not initialize it with a0_base.
+
+gdb/
+ * xtensa-tdep.c (xtensa_derive_tdep): Make sure ar_base is
+ initialized.
+
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ gdb/xtensa-tdep.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
+index 55e7d98..41f5ec1 100644
+--- a/gdb/xtensa-tdep.c
++++ b/gdb/xtensa-tdep.c
+@@ -3175,6 +3175,9 @@ xtensa_derive_tdep (struct gdbarch_tdep *tdep)
+ tdep->num_regs = n;
+ }
+
++ if (tdep->ar_base == -1)
++ tdep->ar_base = tdep->a0_base;
++
+ /* Number of pseudo registers. */
+ tdep->num_pseudo_regs = n - tdep->num_regs;
+
+--
+1.8.1.4
+
diff --git a/packages/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch b/packages/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch
new file mode 100644
index 0000000..506a57c
--- /dev/null
+++ b/packages/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch
@@ -0,0 +1,31 @@
+From 7f8eacbb468575fb67db7fd1155a3aedaa91911b Mon Sep 17 00:00:00 2001
+From: Max Filippov <jcmvbkbc@gmail.com>
+Date: Sun, 7 Jun 2015 23:15:39 +0300
+Subject: [PATCH] WIP: *end of prologue* detection hack
+
+see
+ http://www.esp8266.com/viewtopic.php?p=18461#p18461
+ http://www.esp8266.com/viewtopic.php?p=19026#p19026
+ http://www.esp8266.com/viewtopic.php?p=19683#p19683
+
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ gdb/xtensa-tdep.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
+index 41f5ec1..6a7dba7 100644
+--- a/gdb/xtensa-tdep.c
++++ b/gdb/xtensa-tdep.c
+@@ -2410,7 +2410,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch,
+ /* Find out, if we have an information about the prologue from DWARF. */
+ prologue_sal = find_pc_line (start, 0);
+ if (prologue_sal.line != 0) /* Found debug info. */
+- body_pc = prologue_sal.end;
++ body_pc = prologue_sal.end + 40;
+
+ /* If we are going to analyze the prologue in general without knowing about
+ the current PC, make the best assumtion for the end of the prologue. */
+--
+1.8.1.4
+
diff --git a/packages/gdb/7.10/version.desc b/packages/gdb/7.10/version.desc
new file mode 100644
index 0000000..026d275
--- /dev/null
+++ b/packages/gdb/7.10/version.desc
@@ -0,0 +1 @@
+obsolete="yes"