aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_procinfo.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-03-07 15:54:52 +0100
committerDan Gudmundsson <[email protected]>2014-03-28 10:11:34 +0100
commita7d0e35b834f9b0d9538c75d06dfe3d698a83ded (patch)
treefa3f0573b970e5b18f9133aa01be5beec8836332 /lib/observer/src/observer_procinfo.erl
parente2896b5f3922b8397024aee8f541d46ba5cb0f1d (diff)
downloadotp-a7d0e35b834f9b0d9538c75d06dfe3d698a83ded.tar.gz
otp-a7d0e35b834f9b0d9538c75d06dfe3d698a83ded.tar.bz2
otp-a7d0e35b834f9b0d9538c75d06dfe3d698a83ded.zip
observer: Add simple test and add debug hooks in app
Add hooks in observer so that we can do some basic testing on it
Diffstat (limited to 'lib/observer/src/observer_procinfo.erl')
-rw-r--r--lib/observer/src/observer_procinfo.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/observer/src/observer_procinfo.erl b/lib/observer/src/observer_procinfo.erl
index 3ffa5fc77d..8e8a37fc93 100644
--- a/lib/observer/src/observer_procinfo.erl
+++ b/lib/observer/src/observer_procinfo.erl
@@ -34,6 +34,7 @@
-record(state, {parent,
frame,
+ notebook,
pid,
pages=[],
expand_table,
@@ -76,6 +77,7 @@ init([Pid, ParentFrame, Parent]) ->
{Frame, #state{parent=Parent,
pid=Pid,
frame=Frame,
+ notebook=Notebook,
pages=[ProcessPage,MessagePage,DictPage,StackPage,StatePage],
expand_table=Table
}}
@@ -158,6 +160,9 @@ handle_event(#wx{event=#wxHtmlLink{linkInfo=#wxHtmlLinkInfo{href=Info}}}, State)
handle_event(Event, _State) ->
error({unhandled_event, Event}).
+handle_info({get_debug_info, From}, State = #state{notebook=Notebook}) ->
+ From ! {procinfo_debug, Notebook},
+ {noreply, State};
handle_info(_Info, State) ->
%% io:format("~p: ~p, Handle info: ~p~n", [?MODULE, ?LINE, Info]),
{noreply, State}.