From 3f30a2bf18b0dd810568f14f1b7779689167e9dc Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 17 Nov 2009 00:09:23 +0000 Subject: [PATCH] expand meta-predicates before trying to debug them. --- pl/debug.yap | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pl/debug.yap b/pl/debug.yap index 47201ece8..df0d80cbb 100644 --- a/pl/debug.yap +++ b/pl/debug.yap @@ -384,11 +384,18 @@ debugging :- fail. % if we are in -'$loop_spy2'(GoalNumber, G, Module, CalledFromDebugger, CP) :- +'$loop_spy2'(GoalNumber, G0, Module, CalledFromDebugger, CP) :- /* the following choice point is where the predicate is called */ - b_getval('$spy_glist',[info(_,_,_,Retry,Det)|_]), /* get goal list */ - ( - /* call port */ + ( + '$is_metapredicate'(G0, Module) + -> + '$meta_expansion'(G0,Module,Module,Module,G,[]) + ; + G = G0 + ), + b_getval('$spy_glist',[info(_,_,_,Retry,Det)|_]), /* get goal list */ + ( + /* call port */ '$enter_goal'(GoalNumber, G, Module), '$spycall'(G, Module, CalledFromDebugger, Retry), '$disable_docreep',