aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger/src/dbg_wx_trace.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2016-07-20 14:12:24 +0200
committerPeter Andersson <[email protected]>2016-07-20 14:20:07 +0200
commitbc544c51d84bfd61f3dafc5048e86cea02641b43 (patch)
tree0c34ba9f898ec3d2269c7eff95f4995d69e406a1 /lib/debugger/src/dbg_wx_trace.erl
parent7c10598da79e28c9b802029d94269cbebba2f21e (diff)
downloadotp-bc544c51d84bfd61f3dafc5048e86cea02641b43.tar.gz
otp-bc544c51d84bfd61f3dafc5048e86cea02641b43.tar.bz2
otp-bc544c51d84bfd61f3dafc5048e86cea02641b43.zip
Make sure exit in non-interpreted code doesn't crash the debugger
Diffstat (limited to 'lib/debugger/src/dbg_wx_trace.erl')
-rw-r--r--lib/debugger/src/dbg_wx_trace.erl13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/debugger/src/dbg_wx_trace.erl b/lib/debugger/src/dbg_wx_trace.erl
index 6af19af33b..29c8e8cefb 100644
--- a/lib/debugger/src/dbg_wx_trace.erl
+++ b/lib/debugger/src/dbg_wx_trace.erl
@@ -818,11 +818,14 @@ gui_show_module(Win, Mod, Line, _Cm, Pid, How) ->
gui_load_module(Win, Mod, _Pid) ->
dbg_wx_trace_win:display(Win,{text, "Loading module..."}),
- %% Contents = int:contents(Mod, Pid),
- {ok, Contents} = dbg_iserver:call({raw_contents, Mod, any}),
- Win2 = dbg_wx_trace_win:show_code(Win, Mod, Contents),
- dbg_wx_trace_win:display(Win,{text, ""}),
- Win2.
+ case dbg_iserver:call({raw_contents, Mod, any}) of
+ {ok, Contents} ->
+ Win2 = dbg_wx_trace_win:show_code(Win, Mod, Contents),
+ dbg_wx_trace_win:display(Win,{text, ""}),
+ Win2;
+ not_found ->
+ dbg_wx_trace_win:show_no_code(Win)
+ end.
gui_update_bindings(Win,Meta) ->
Bs = int:meta(Meta, bindings, nostack),