aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger/src/dbg_istk.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-03-31 08:33:56 +0200
committerBjörn Gustavsson <[email protected]>2011-08-16 08:58:48 +0200
commite21b58ac5a016d62bba8117ec09105bcac8b94e8 (patch)
tree410f197a7b524d321d738aac2fd46f912fd44efc /lib/debugger/src/dbg_istk.erl
parentbbb379003d071f19595bb36d3ead79ba0c8474d3 (diff)
downloadotp-e21b58ac5a016d62bba8117ec09105bcac8b94e8.tar.gz
otp-e21b58ac5a016d62bba8117ec09105bcac8b94e8.tar.bz2
otp-e21b58ac5a016d62bba8117ec09105bcac8b94e8.zip
Fix the no_tail option
The 'no_tail' option was broken and would work almost as the 'all' option, because it would use #ieval.top (formerly known as #ieval.last_call) as the basis for its decision to push or not. Fix it by including a boolean in each call/apply instruction indicating whether the call is tail-recursive and pass that boolean to the dbg_istk:push() function.
Diffstat (limited to 'lib/debugger/src/dbg_istk.erl')
-rw-r--r--lib/debugger/src/dbg_istk.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/debugger/src/dbg_istk.erl b/lib/debugger/src/dbg_istk.erl
index a0d3069d50..21365fa4e9 100644
--- a/lib/debugger/src/dbg_istk.erl
+++ b/lib/debugger/src/dbg_istk.erl
@@ -18,7 +18,7 @@
%%
-module(dbg_istk).
-export([init/0,delayed_to_external/0,from_external/1,
- push/2,pop/0,pop/1,stack_level/0,
+ push/3,pop/0,pop/1,stack_level/0,
delayed_stacktrace/0,delayed_stacktrace/2,
bindings/1,stack_frame/2,backtrace/2,
in_use_p/2]).
@@ -61,8 +61,8 @@ init(Stack) ->
%% false - nothing is pushed
%% Whenever a function returns, the corresponding call frame is popped.
-push(Bs, #ieval{level=Le,module=Mod,function=Name,arguments=As,
- line=Li,top=Lc}=Ieval) ->
+push(Bs, #ieval{level=Le,module=Mod,function=Name,
+ arguments=As,line=Li}=Ieval, Lc) ->
Entry = #e{level=Le,mfa={Mod,Name,As},line=Li,bindings=Bs},
case get(trace_stack) of
false ->