2016-02-05 11:27:43 +00:00
|
|
|
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>
|
|
|
|
---
|
2017-12-02 20:44:39 +00:00
|
|
|
gdb/xtensa-tdep.c | 3 +++
|
2016-02-05 11:27:43 +00:00
|
|
|
1 file changed, 3 insertions(+)
|
|
|
|
|
|
|
|
--- a/gdb/xtensa-tdep.c
|
|
|
|
+++ b/gdb/xtensa-tdep.c
|
2017-12-02 20:44:39 +00:00
|
|
|
@@ -3175,6 +3175,9 @@
|
2016-02-05 11:27:43 +00:00
|
|
|
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;
|
|
|
|
|