summaryrefslogtreecommitdiff
path: root/sys/arch/sh
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2017-11-03 11:29:48 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2017-11-03 11:29:48 +0000
commita2f211fed8f5e2dadd49eaec6a9cb86cc885ee22 (patch)
tree4bbd23eb34c979871b3e1d78aedd172c23be1545 /sys/arch/sh
parentb3f858de1767085e23bbabf383b31bcefe56ca47 (diff)
use %lx to print the frame address if resolving of the symbol name fails
as discussed with and ok mpi@
Diffstat (limited to 'sys/arch/sh')
-rw-r--r--sys/arch/sh/sh/db_trace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/sh/sh/db_trace.c b/sys/arch/sh/sh/db_trace.c
index a7f97d71957..10339844473 100644
--- a/sys/arch/sh/sh/db_trace.c
+++ b/sys/arch/sh/sh/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.7 2017/05/30 15:39:05 mpi Exp $ */
+/* $OpenBSD: db_trace.c,v 1.8 2017/11/03 11:29:46 jasper Exp $ */
/* $NetBSD: db_trace.c,v 1.19 2006/01/21 22:10:59 uwe Exp $ */
/*-
@@ -122,7 +122,11 @@ db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
sym = db_search_symbol(callpc, DB_STGY_ANY, &offset);
db_symbol_values(sym, &name, NULL);
- (*print)("%s() at ", name ? name : "");
+ if (name == NULL)
+ (*print)("%lx()", callpc);
+ else
+ (*print)("%s() at ", name);
+
db_printsym(callpc, DB_STGY_PROC, print);
(*print)("\n");