aboutsummaryrefslogtreecommitdiff
path: root/core/stack.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-08-11 16:33:32 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-08-11 16:33:32 +1000
commit3428deb9b97ee9e16e20f85442d555ca168a6839 (patch)
tree1b209b67e89feb07952a9fd1ddaaea4592e4a4e4 /core/stack.c
parent083e12d4e03d56440fa0a39cabed25809f405f25 (diff)
downloadskiboot-3428deb9b97ee9e16e20f85442d555ca168a6839.zip
skiboot-3428deb9b97ee9e16e20f85442d555ca168a6839.tar.gz
skiboot-3428deb9b97ee9e16e20f85442d555ca168a6839.tar.bz2
Don't try to print symbol when we didn't find one
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/stack.c')
-rw-r--r--core/stack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/stack.c b/core/stack.c
index 1341175..17f89d4 100644
--- a/core/stack.c
+++ b/core/stack.c
@@ -78,10 +78,12 @@ void __print_backtrace(unsigned int pir,
mark = ' ';
if (symbols)
saddr = get_symbol(entries->pc, &sym, &sym_end);
+ else
+ saddr = 0;
l += snprintf(buf + l, max - l,
" S: %016lx R: %016lx %c ",
entries->sp, entries->pc, mark);
- while(sym < sym_end && l < max)
+ while(saddr && sym < sym_end && l < max)
buf[l++] = *(sym++);
if (sym && l < max)
l += snprintf(buf + l, max - l, "+0x%lx\n",