more debugger fixes: use $leave_creep to avoid creeping all over the place.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@387 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
		
							
								
								
									
										22
									
								
								pl/debug.yap
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								pl/debug.yap
									
									
									
									
									
								
							@@ -267,9 +267,15 @@ debugging :-
 | 
				
			|||||||
'$direct_spy'([M|G]) :-
 | 
					'$direct_spy'([M|G]) :-
 | 
				
			||||||
         '$hidden'(G),
 | 
					         '$hidden'(G),
 | 
				
			||||||
         !,
 | 
					         !,
 | 
				
			||||||
	 /* called from prolog module   */
 | 
						 (
 | 
				
			||||||
	 '$execute0'(G,M),
 | 
						   G = '$leave_creep'
 | 
				
			||||||
	 '$creep'.
 | 
						 ->
 | 
				
			||||||
 | 
						   true
 | 
				
			||||||
 | 
						 ;
 | 
				
			||||||
 | 
						   /* called from prolog module   */
 | 
				
			||||||
 | 
						   '$execute0'(G,M),
 | 
				
			||||||
 | 
						   '$creep'
 | 
				
			||||||
 | 
						 ).
 | 
				
			||||||
'$direct_spy'([Mod|G]) :-
 | 
					'$direct_spy'([Mod|G]) :-
 | 
				
			||||||
	'$do_spy'(G, Mod).
 | 
						'$do_spy'(G, Mod).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -449,7 +455,8 @@ debugging :-
 | 
				
			|||||||
	'$do_execute_clause'(G,M,Cl).
 | 
						'$do_execute_clause'(G,M,Cl).
 | 
				
			||||||
'$spycall'(G,M,Cl) :-
 | 
					'$spycall'(G,M,Cl) :-
 | 
				
			||||||
	'$setflop'(0),
 | 
						'$setflop'(0),
 | 
				
			||||||
	'$do_creep_execute'(G,M,Cl).
 | 
						'$do_creep_execute'(G,M,Cl),
 | 
				
			||||||
 | 
						'$leave_creep'.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
'$log_upd_spycall'(G,M,Cl,Index) :-
 | 
					'$log_upd_spycall'(G,M,Cl,Index) :-
 | 
				
			||||||
	'$access_yap_flags'(10,0),
 | 
						'$access_yap_flags'(10,0),
 | 
				
			||||||
@@ -468,7 +475,8 @@ debugging :-
 | 
				
			|||||||
	'$do_execute_dynamic_clause'(G,M,Cl).
 | 
						'$do_execute_dynamic_clause'(G,M,Cl).
 | 
				
			||||||
'$spycall_dynamic'(G,M,Cl) :-
 | 
					'$spycall_dynamic'(G,M,Cl) :-
 | 
				
			||||||
	'$setflop'(0),
 | 
						'$setflop'(0),
 | 
				
			||||||
	'$do_creep_execute_dynamic'(G,M,Cl).
 | 
						'$do_creep_execute_dynamic'(G,M,Cl),
 | 
				
			||||||
 | 
						'$leave_creep'.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
'$spycall_stdpred'(G,M) :-
 | 
					'$spycall_stdpred'(G,M) :-
 | 
				
			||||||
        CP is '$last_choice_pt',
 | 
					        CP is '$last_choice_pt',
 | 
				
			||||||
@@ -556,8 +564,8 @@ debugging :-
 | 
				
			|||||||
	    Next is Cl+1, '$set_value'(spy_cl,Next), fail
 | 
						    Next is Cl+1, '$set_value'(spy_cl,Next), fail
 | 
				
			||||||
        ).
 | 
					        ).
 | 
				
			||||||
'$do_creep_execute'(G,M,Cl) :-
 | 
					'$do_creep_execute'(G,M,Cl) :-
 | 
				
			||||||
	'$creep_execute'(G,M,Cl) ;
 | 
						'$creep_execute'(G,M,Cl), '$leave_creep' ; 
 | 
				
			||||||
	Next is Cl+1, '$set_value'(spy_cl,Next), fail.
 | 
						'$leave_creep', Next is Cl+1, '$set_value'(spy_cl,Next), fail.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
'$do_creep_log_upd_execute'(G,M,Cl,Index) :-
 | 
					'$do_creep_log_upd_execute'(G,M,Cl,Index) :-
 | 
				
			||||||
	'$check_depth_for_interpreter'(D),
 | 
						'$check_depth_for_interpreter'(D),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user