Permalink
Browse files

Fix a crash in debugger handling breaks

When using the debugger application to add breaks,
breaks are not restored if you close/open code view.
Moreover, after reopening trying Break-> Enable All
will crash debugger UI and output on the shell:
dbg_wx_view:error {badmatch,false}

dbg_iserver:handle_call/3 returns a wong list of breaks,
as the filter function is wrong.
The patch fixes the filter function, hence the breaks
are restored in the code view and no crashes occur.
Thanks to Abdul Fattah Mahran <abdoo.mahran@gmail.com>
for helping out with testing and debugging.
  • Loading branch information...
1 parent 5d74fed commit 072f256e1c6cf2c60777b64d99229d3d2bb12c95 @spawnthink committed Mar 14, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/debugger/src/dbg_iserver.erl
@@ -189,7 +189,7 @@ handle_call(all_breaks, _From, State) ->
{reply, State#state.breaks, State};
handle_call({all_breaks, Mod}, _From, State) ->
Reply = lists:filter(fun({{M,_L}, _Options}) ->
- M =/= Mod
+ M =:= Mod
end,
State#state.breaks),
{reply, Reply, State};

0 comments on commit 072f256

Please sign in to comment.