aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-01-10 16:05:56 +0100
committerDan Gudmundsson <[email protected]>2013-01-10 16:05:56 +0100
commitc7a03db603434507108413605d6701758d3842c1 (patch)
treebc6e9b6cfff4b6946988e064bd90e8105578c9f7 /lib/debugger
parentec68166e7512cb442f4995c0e3044a106f1a6372 (diff)
downloadotp-c7a03db603434507108413605d6701758d3842c1.tar.gz
otp-c7a03db603434507108413605d6701758d3842c1.tar.bz2
otp-c7a03db603434507108413605d6701758d3842c1.zip
debugger: Fix user evalution dependent of bindings in trace window
Bindings in erl_eval is an orddict and must be sorted otherwise they are not found, depending on creation order
Diffstat (limited to 'lib/debugger')
-rw-r--r--lib/debugger/src/dbg_debugged.erl5
-rw-r--r--lib/debugger/src/dbg_ieval.erl4
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/debugger/src/dbg_debugged.erl b/lib/debugger/src/dbg_debugged.erl
index 4d9ffc4f3b..c21ad486e8 100644
--- a/lib/debugger/src/dbg_debugged.erl
+++ b/lib/debugger/src/dbg_debugged.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -104,7 +104,8 @@ handle_command(Command) ->
reply({apply,M,F,As}) ->
{value, erlang:apply(M,F,As)};
reply({eval,Expr,Bs}) ->
- erl_eval:expr(Expr, Bs). % {value, Value, Bs2}
+ %% Bindings is an orddict (sort them)
+ erl_eval:expr(Expr, lists:sort(Bs)). % {value, Value, Bs2}
%% Demonitor and delete message from inbox
%%
diff --git a/lib/debugger/src/dbg_ieval.erl b/lib/debugger/src/dbg_ieval.erl
index 5e5948c965..3c084c53ac 100644
--- a/lib/debugger/src/dbg_ieval.erl
+++ b/lib/debugger/src/dbg_ieval.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -249,7 +249,7 @@ meta_loop(Debugged, Bs, #ieval{level=Le} = Ieval) ->
{sys, Debugged, {value,Val}} ->
{value, Val, Bs};
{sys, Debugged, {value,Val,Bs2}} ->
- {value, Val, Bs2};
+ {value, Val, merge_bindings(Bs2, Bs, Ieval)};
{sys, Debugged, {exception,{Class,Reason,Stk}}} ->
case get(exit_info) of