aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-11-28 18:13:38 +0100
committerRickard Green <[email protected]>2016-12-19 14:22:29 +0100
commit0612bcedf520388d58a9441e9e6490bf86bf5a4b (patch)
treea5fee16b2b28842c65a6aa122344290427987c94 /erts/etc
parentd44f2e85c058e10082427a354a7d65e9af607501 (diff)
downloadotp-0612bcedf520388d58a9441e9e6490bf86bf5a4b.tar.gz
otp-0612bcedf520388d58a9441e9e6490bf86bf5a4b.tar.bz2
otp-0612bcedf520388d58a9441e9e6490bf86bf5a4b.zip
Fix stactrace for apply on error/[1,2], exit/1, or throw/1
Diffstat (limited to 'erts/etc')
-rw-r--r--erts/etc/unix/etp-commands.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/erts/etc/unix/etp-commands.in b/erts/etc/unix/etp-commands.in
index fa68bd26ee..f2babc48d2 100644
--- a/erts/etc/unix/etp-commands.in
+++ b/erts/etc/unix/etp-commands.in
@@ -1322,7 +1322,11 @@ define etp-stacktrace
set $etp_stacktrace_p = ($arg0)->stop
set $etp_stacktrace_end = ($arg0)->hend
printf "%% Stacktrace (%u): ", $etp_stacktrace_end-$etp_stacktrace_p
- etp ($arg0)->cp
+ if ($arg0)->cp == 0x0
+ printf "NULL\n"
+ else
+ etp ($arg0)->cp
+ end
while $etp_stacktrace_p < $etp_stacktrace_end
if ($etp_stacktrace_p[0] & 0x3) == 0x0
# Continuation pointer
@@ -1350,7 +1354,11 @@ define etp-stackdump
set $etp_stackdump_p = ($arg0)->stop
set $etp_stackdump_end = ($arg0)->hend
printf "%% Stackdump (%u): ", $etp_stackdump_end-$etp_stackdump_p
- etp ($arg0)->cp
+ if ($arg0)->cp == 0x0
+ printf "NULL\n"
+ else
+ etp ($arg0)->cp
+ end
while $etp_stackdump_p < $etp_stackdump_end
etp $etp_stackdump_p[0]
set $etp_stackdump_p++