From e69c9fc05668d5e612a813afbfd5091c739fc7d4 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sat, 17 Jan 2015 02:41:30 -0800 Subject: [PATCH] fix spy --- pl/debug.yap | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pl/debug.yap b/pl/debug.yap index 6d05371db..01e4b22b4 100644 --- a/pl/debug.yap +++ b/pl/debug.yap @@ -136,8 +136,12 @@ mode and the existing spy-points, when the debugger is on. '$exec_spy'( M, G, Action ) :- - '$import_chain'( M, G, M0, S0 ), - '$system_predicate'(S0,M0), + '$follow_import_chain'( M, G, M0, G0 ), + '$exec_spy2'( M0, G0, Action ). + + +'$exec_spy2'( M0, S0, Action ) :- + '$system_predicate'(S0,M0), 1, '$flags'(S0,M0,F,F), ( F /\ 0x118dd080 =\= 0 @@ -149,6 +153,8 @@ mode and the existing spy-points, when the debugger is on. true ), '$suspy2'(Action, S0, M0 ). +'$exec_spy2'( M0, S0, Action ) :- + '$suspy2'(Action, S0, M0 ). '$suspy2'(spy,T,M) :- recorded('$spy','$spy'(T,M),_), !,