summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/gdb/files/0005-Fix-debug-message-when-register-is-unavailable.patch
diff options
context:
space:
mode:
authorNathan Rossi <nathan.rossi@xilinx.com>2013-12-16 16:48:36 +1000
committerNathan Rossi <nathan.rossi@xilinx.com>2013-12-16 16:48:36 +1000
commit74f73159e5c659d8ee52a3d48238932b36e4fe93 (patch)
tree824b4a830e733161d055a12d6993dc6c8cd45da3 /recipes-devtools/gdb/files/0005-Fix-debug-message-when-register-is-unavailable.patch
parent3ec0d044ea0c5fca26eecc0335bb9847871255ea (diff)
downloadmeta-xilinx-74f73159e5c659d8ee52a3d48238932b36e4fe93.tar.gz
gdb: Add MicroBlaze support
* Import Xilinx gdb patches for MicroBlaze * Disable dependence on LTTng-UST for MicroBlaze, it is not supported Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Diffstat (limited to 'recipes-devtools/gdb/files/0005-Fix-debug-message-when-register-is-unavailable.patch')
-rw-r--r--recipes-devtools/gdb/files/0005-Fix-debug-message-when-register-is-unavailable.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-devtools/gdb/files/0005-Fix-debug-message-when-register-is-unavailable.patch b/recipes-devtools/gdb/files/0005-Fix-debug-message-when-register-is-unavailable.patch
new file mode 100644
index 00000000..67520f4c
--- /dev/null
+++ b/recipes-devtools/gdb/files/0005-Fix-debug-message-when-register-is-unavailable.patch
@@ -0,0 +1,40 @@
1From: Nathan Rossi <nathan.rossi@petalogix.com>
2Date: Tue, 8 May 2012 18:11:17 +1000
3Subject: Fix debug message when register is unavailable
4
5Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com>
6Upstream-Status: Pending
7---
8 gdb/frame.c | 13 ++++++++++---
9 1 file changed, 10 insertions(+), 3 deletions(-)
10
11diff --git a/gdb/frame.c b/gdb/frame.c
12index 4b8ab60..7ad7cb3 100644
13--- a/gdb/frame.c
14+++ b/gdb/frame.c
15@@ -979,12 +979,19 @@ frame_unwind_register_value (struct frame_info *frame, int regnum)
16 else
17 {
18 int i;
19- const gdb_byte *buf = value_contents (value);
20+ const gdb_byte *buf = NULL;
21+ if (value_entirely_available(value)) {
22+ buf = value_contents (value);
23+ }
24
25 fprintf_unfiltered (gdb_stdlog, " bytes=");
26 fprintf_unfiltered (gdb_stdlog, "[");
27- for (i = 0; i < register_size (gdbarch, regnum); i++)
28- fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
29+ if (buf != NULL) {
30+ for (i = 0; i < register_size (gdbarch, regnum); i++)
31+ fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
32+ } else {
33+ fprintf_unfiltered (gdb_stdlog, "unavailable");
34+ }
35 fprintf_unfiltered (gdb_stdlog, "]");
36 }
37 }
38--
391.7.9.5
40