From b1ee66711e447a1666b07d9160ee28d096c17064 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 6 Aug 2013 12:20:01 +0200 Subject: Allow 'silent' flag to be set with dbg:p/2 This flag, which silences call trace, can be set with erlang:trace/3, but was not allowed in dbg:p/2. This has been corrected. --- lib/runtime_tools/doc/src/dbg.xml | 2 +- lib/runtime_tools/src/dbg.erl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/runtime_tools') diff --git a/lib/runtime_tools/doc/src/dbg.xml b/lib/runtime_tools/doc/src/dbg.xml index d8c82b2459..36b3b51a99 100644 --- a/lib/runtime_tools/doc/src/dbg.xml +++ b/lib/runtime_tools/doc/src/dbg.xml @@ -244,7 +244,7 @@ Error: fun containing local erlang function calls ('is_atomm' called in guard)\ all -

Sets all flags.

+

Sets all flags except silent.

clear diff --git a/lib/runtime_tools/src/dbg.erl b/lib/runtime_tools/src/dbg.erl index 6b2fb0460f..f0086e8cc7 100644 --- a/lib/runtime_tools/src/dbg.erl +++ b/lib/runtime_tools/src/dbg.erl @@ -1113,7 +1113,7 @@ transform_flags([sos|Tail],Acc) -> transform_flags(Tail,[set_on_spawn|Acc]); transform_flags([sol|Tail],Acc) -> transform_flags(Tail,[set_on_link|Acc]); transform_flags([sofs|Tail],Acc) -> transform_flags(Tail,[set_on_first_spawn|Acc]); transform_flags([sofl|Tail],Acc) -> transform_flags(Tail,[set_on_first_link|Acc]); -transform_flags([all|_],_Acc) -> all(); +transform_flags([all|_],_Acc) -> all()--[silent]; transform_flags([F|Tail]=List,Acc) when is_atom(F) -> case lists:member(F, all()) of true -> transform_flags(Tail,[F|Acc]); @@ -1124,7 +1124,7 @@ transform_flags(Bad,_Acc) -> {error,{bad_flags,Bad}}. all() -> [send,'receive',call,procs,garbage_collection,running, set_on_spawn,set_on_first_spawn,set_on_link,set_on_first_link, - timestamp,arity,return_to]. + timestamp,arity,return_to,silent]. display_info([Node|Nodes]) -> io:format("~nNode ~w:~n",[Node]), -- cgit v1.2.3