-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gdb: Add support for v7.11, port patches from v7.10.1 that apply
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
- Loading branch information
Showing
4 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
+ |
35 changes: 35 additions & 0 deletions
35
patches/gdb/7.11/111-xtensa-make-sure-ar_base-is-initialized.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
31 changes: 31 additions & 0 deletions
31
patches/gdb/7.11/112-WIP-end-of-prologue-detection-hack.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|