fix ^c abort for PCs: registers were not being reset properly.
fix error message in abort. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@628 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
bfbc9c9dfc
commit
935665ec92
3
C/exec.c
3
C/exec.c
@ -1659,6 +1659,9 @@ JumpToEnv(Term t) {
|
|||||||
/* uncaught throw */
|
/* uncaught throw */
|
||||||
if (B == NULL) {
|
if (B == NULL) {
|
||||||
B = B0;
|
B = B0;
|
||||||
|
#if PUSH_REGS
|
||||||
|
restore_absmi_regs(&standard_regs);
|
||||||
|
#endif
|
||||||
siglongjmp(RestartEnv,1);
|
siglongjmp(RestartEnv,1);
|
||||||
}
|
}
|
||||||
/* is it a continuation? */
|
/* is it a continuation? */
|
||||||
|
@ -30,13 +30,9 @@ static char SccsId[] = "%W% %G%";
|
|||||||
#if _MSC_VER || defined(__MINGW32__)
|
#if _MSC_VER || defined(__MINGW32__)
|
||||||
#define _WIN32_WINNT 0x0400
|
#define _WIN32_WINNT 0x0400
|
||||||
#endif
|
#endif
|
||||||
#include "Yap.h"
|
#include "absmi.h"
|
||||||
#include "yapio.h"
|
#include "yapio.h"
|
||||||
#include "eval.h"
|
|
||||||
#include "Yatom.h"
|
|
||||||
#include "Heap.h"
|
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "tracer.h"
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#if STDC_HEADERS
|
#if STDC_HEADERS
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -1089,6 +1085,9 @@ InteractSIGINT(int ch) {
|
|||||||
#if _MSC_VER || defined(__MINGW32__)
|
#if _MSC_VER || defined(__MINGW32__)
|
||||||
/* don't even think about trying this */
|
/* don't even think about trying this */
|
||||||
#else
|
#else
|
||||||
|
#if PUSH_REGS
|
||||||
|
restore_absmi_regs(&standard_regs);
|
||||||
|
#endif
|
||||||
siglongjmp (RestartEnv, 1);
|
siglongjmp (RestartEnv, 1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -489,6 +489,7 @@ exec_top_level(int BootMode, char *filename)
|
|||||||
livegoal = YAP_FullLookupAtom("$live");
|
livegoal = YAP_FullLookupAtom("$live");
|
||||||
atomfalse = YAP_MkAtomTerm (YAP_LookupAtom("false"));
|
atomfalse = YAP_MkAtomTerm (YAP_LookupAtom("false"));
|
||||||
while (YAP_GetValue (livegoal) != atomfalse) {
|
while (YAP_GetValue (livegoal) != atomfalse) {
|
||||||
|
YAP_Reset();
|
||||||
do_top_goal (YAP_MkAtomTerm (livegoal));
|
do_top_goal (YAP_MkAtomTerm (livegoal));
|
||||||
}
|
}
|
||||||
YAP_Exit(EXIT_SUCCESS);
|
YAP_Exit(EXIT_SUCCESS);
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
fail.
|
fail.
|
||||||
|
|
||||||
'$process_error'(abort) :- !,
|
'$process_error'(abort) :- !,
|
||||||
'$format'(user_error,'[ Execution Aborted ]~n').
|
'$format'(user_error,"[ Execution Aborted ]~n",[]).
|
||||||
'$process_error'(error(Msg, Where)) :- !,
|
'$process_error'(error(Msg, Where)) :- !,
|
||||||
'$set_fpu_exceptions',
|
'$set_fpu_exceptions',
|
||||||
'$print_message'(error,error(Msg, Where)).
|
'$print_message'(error,error(Msg, Where)).
|
||||||
@ -180,6 +180,8 @@ print_message(Level, Mss) :-
|
|||||||
'$preprocess_stack'(Gs, NGs).
|
'$preprocess_stack'(Gs, NGs).
|
||||||
'$beautify_hidden_goal'('$consult',1,prolog,ClNo,Gs,NGs) :- !,
|
'$beautify_hidden_goal'('$consult',1,prolog,ClNo,Gs,NGs) :- !,
|
||||||
'$preprocess_stack'(Gs, NGs).
|
'$preprocess_stack'(Gs, NGs).
|
||||||
|
'$beautify_hidden_goal'('$reconsult',1,prolog,ClNo,Gs,NGs) :- !,
|
||||||
|
'$preprocess_stack'(Gs, NGs).
|
||||||
'$beautify_hidden_goal'('$undefp',1,prolog,ClNo,Gs,NGs) :- !,
|
'$beautify_hidden_goal'('$undefp',1,prolog,ClNo,Gs,NGs) :- !,
|
||||||
'$preprocess_stack'(Gs, NGs).
|
'$preprocess_stack'(Gs, NGs).
|
||||||
'$beautify_hidden_goal'('$consult',2,prolog,ClNo,Gs,[cl(consult,1,prolog,ClNo)|NGs]) :- !,
|
'$beautify_hidden_goal'('$consult',2,prolog,ClNo,Gs,[cl(consult,1,prolog,ClNo)|NGs]) :- !,
|
||||||
|
Reference in New Issue
Block a user