summaryrefslogtreecommitdiff
path: root/patches/gdb/7.11/111-xtensa-make-sure-ar_base-is-initialized.patch
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2016-02-25 20:17:44 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2016-02-25 20:17:44 (GMT)
commit4d7e6fb0030dcd6fc2f8cbe547d9bf2b528adc6a (patch)
treec061e2d022ac42a202dca883b08c8151a6d928ca /patches/gdb/7.11/111-xtensa-make-sure-ar_base-is-initialized.patch
parentc280596907079d91b75226adc7ae559678ff0293 (diff)
parentf9a704bd44de89db178428bc754be1abbdd514eb (diff)
Merge pull request #354 from westermo/upgrade-gdb
gdb: Add support for v7.11, port patches from v7.10.1 that apply
Diffstat (limited to 'patches/gdb/7.11/111-xtensa-make-sure-ar_base-is-initialized.patch')
-rw-r--r--patches/gdb/7.11/111-xtensa-make-sure-ar_base-is-initialized.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/patches/gdb/7.11/111-xtensa-make-sure-ar_base-is-initialized.patch b/patches/gdb/7.11/111-xtensa-make-sure-ar_base-is-initialized.patch
new file mode 100644
index 0000000..982bd7f
--- /dev/null
+++ b/patches/gdb/7.11/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
+