diff options
Diffstat (limited to 'meta-microblaze/recipes-devtools/binutils/binutils/0036-Fix-debug-message-when-register-is-unavailable.patch')
-rw-r--r-- | meta-microblaze/recipes-devtools/binutils/binutils/0036-Fix-debug-message-when-register-is-unavailable.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0036-Fix-debug-message-when-register-is-unavailable.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0036-Fix-debug-message-when-register-is-unavailable.patch new file mode 100644 index 00000000..79d08da9 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0036-Fix-debug-message-when-register-is-unavailable.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From dc76254a84fa1086983aefe9db4d8f94b42efb9b Mon Sep 17 00:00:00 2001 | ||
2 | From: Nathan Rossi <nathan.rossi@petalogix.com> | ||
3 | Date: Tue, 8 May 2012 18:11:17 +1000 | ||
4 | Subject: [PATCH 36/40] Fix debug message when register is unavailable | ||
5 | |||
6 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | ||
7 | --- | ||
8 | gdb/frame.c | 13 ++++++++++--- | ||
9 | 1 file changed, 10 insertions(+), 3 deletions(-) | ||
10 | |||
11 | diff --git a/gdb/frame.c b/gdb/frame.c | ||
12 | index ff27b9f00e9..bf931b370c9 100644 | ||
13 | --- a/gdb/frame.c | ||
14 | +++ b/gdb/frame.c | ||
15 | @@ -1263,12 +1263,19 @@ frame_unwind_register_value (frame_info *next_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 | -- | ||
39 | 2.17.1 | ||
40 | |||