stack info
This commit is contained in:
parent
4fefb762f2
commit
fd4f53a899
18
C/stack.c
18
C/stack.c
@ -1808,7 +1808,7 @@ void Yap_dump_stack(void) {
|
|||||||
yap_error_class_number classno = Yap_errorClass(errnb);
|
yap_error_class_number classno = Yap_errorClass(errnb);
|
||||||
|
|
||||||
fprintf(stderr, "%% Error STATUS: %s/%s\n\n", Yap_errorName(errnb),
|
fprintf(stderr, "%% Error STATUS: %s/%s\n\n", Yap_errorName(errnb),
|
||||||
Yap_errorName(classno));
|
Yap_errorClassName(classno));
|
||||||
|
|
||||||
fprintf(stderr, "%% Execution mode\n");
|
fprintf(stderr, "%% Execution mode\n");
|
||||||
if (LOCAL_PrologMode & BootMode)
|
if (LOCAL_PrologMode & BootMode)
|
||||||
@ -1846,7 +1846,7 @@ void Yap_dump_stack(void) {
|
|||||||
if (LOCAL_PrologMode & SystemMode)
|
if (LOCAL_PrologMode & SystemMode)
|
||||||
fprintf(stderr, "%% Prolog Internals\n");
|
fprintf(stderr, "%% Prolog Internals\n");
|
||||||
if (LOCAL_PrologMode & AsyncIntMode)
|
if (LOCAL_PrologMode & AsyncIntMode)
|
||||||
fprintf(stderr, "%% Async Interruot mode\n");
|
fprintf(stderr, "%% Async Interrupt mode\n");
|
||||||
if (LOCAL_PrologMode & InReadlineMode)
|
if (LOCAL_PrologMode & InReadlineMode)
|
||||||
fprintf(stderr, "%% Readline Console\n");
|
fprintf(stderr, "%% Readline Console\n");
|
||||||
if (LOCAL_PrologMode & TopGoalMode)
|
if (LOCAL_PrologMode & TopGoalMode)
|
||||||
@ -1854,8 +1854,7 @@ void Yap_dump_stack(void) {
|
|||||||
fprintf(stderr, "%% \n%% -------------------------------------\n%%\n");
|
fprintf(stderr, "%% \n%% -------------------------------------\n%%\n");
|
||||||
fprintf(stderr, "%% \n%% YAP Program :\n");
|
fprintf(stderr, "%% \n%% YAP Program :\n");
|
||||||
fprintf(stderr, "%% \n%% -------------------------------------\n%%\n");
|
fprintf(stderr, "%% \n%% -------------------------------------\n%%\n");
|
||||||
fprintf(stderr, "%% Program Position\n\n", Yap_errorName(errno),
|
fprintf(stderr, "%% Program Position\n\n");
|
||||||
Yap_errorName(classno));
|
|
||||||
Yap_detect_bug_location(CP, FIND_PRED_FROM_ANYWHERE, 256);
|
Yap_detect_bug_location(CP, FIND_PRED_FROM_ANYWHERE, 256);
|
||||||
fprintf(stderr, "%% PC: %s\n", (char *)HR);
|
fprintf(stderr, "%% PC: %s\n", (char *)HR);
|
||||||
Yap_detect_bug_location(CP, FIND_PRED_FROM_ANYWHERE, 256);
|
Yap_detect_bug_location(CP, FIND_PRED_FROM_ANYWHERE, 256);
|
||||||
@ -1928,7 +1927,7 @@ void Yap_dump_stack(void) {
|
|||||||
}
|
}
|
||||||
if (b_ptr) {
|
if (b_ptr) {
|
||||||
if (!max_count--) {
|
if (!max_count--) {
|
||||||
fprintf(stderr, "%%\** .....\n");
|
fprintf(stderr, "%% \\** .....\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (b_ptr->cp_ap && /* tabling */
|
if (b_ptr->cp_ap && /* tabling */
|
||||||
@ -1947,6 +1946,7 @@ void Yap_dump_stack(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DumpActiveGoals(USES_REGS1) {
|
void DumpActiveGoals(USES_REGS1) {
|
||||||
/* try to dump active goals */
|
/* try to dump active goals */
|
||||||
CELL *ep = YENV; /* and current environment */
|
CELL *ep = YENV; /* and current environment */
|
||||||
@ -2002,7 +2002,7 @@ void DumpActiveGoals(USES_REGS1) {
|
|||||||
op_numbers opnum;
|
op_numbers opnum;
|
||||||
if (!ONLOCAL(b_ptr) || b_ptr->cp_b == NULL)
|
if (!ONLOCAL(b_ptr) || b_ptr->cp_b == NULL)
|
||||||
break;
|
break;
|
||||||
fprintf(stderr, "%%p ", b_ptr);
|
fprintf(stderr, "%% %p ", b_ptr);
|
||||||
pe = Yap_PredForChoicePt(b_ptr, &opnum);
|
pe = Yap_PredForChoicePt(b_ptr, &opnum);
|
||||||
if (opnum == _Nstop) {
|
if (opnum == _Nstop) {
|
||||||
fprintf(stderr, " ********** C-Code Interface Boundary ***********\n");
|
fprintf(stderr, " ********** C-Code Interface Boundary ***********\n");
|
||||||
@ -2090,15 +2090,15 @@ void Yap_detect_bug_location(yamop *yap_pc, int where_from, int psize) {
|
|||||||
if ((cl = Yap_PredForCode(yap_pc, where_from, &pred_name, &pred_arity,
|
if ((cl = Yap_PredForCode(yap_pc, where_from, &pred_name, &pred_arity,
|
||||||
&pred_module)) == 0) {
|
&pred_module)) == 0) {
|
||||||
/* system predicate */
|
/* system predicate */
|
||||||
fprintf(stderr, "%%s", "meta-call");
|
fprintf(stderr, "%% %s", "meta-call");
|
||||||
} else if (pred_module == 0) {
|
} else if (pred_module == 0) {
|
||||||
fprintf(stderr, "in prolog:%s/%lu", RepAtom(pred_name)->StrOfAE,
|
fprintf(stderr, "in prolog:%s/%lu", RepAtom(pred_name)->StrOfAE,
|
||||||
(unsigned long int)pred_arity);
|
(unsigned long int)pred_arity);
|
||||||
} else if (cl < 0) {
|
} else if (cl < 0) {
|
||||||
fprintf(stderr, "%%s:%s/%lu", RepAtom(AtomOfTerm(pred_module))->StrOfAE,
|
fprintf(stderr, "%% %s:%s/%lu", RepAtom(AtomOfTerm(pred_module))->StrOfAE,
|
||||||
RepAtom(pred_name)->StrOfAE, (unsigned long int)pred_arity);
|
RepAtom(pred_name)->StrOfAE, (unsigned long int)pred_arity);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "%%s:%s/%lu at clause %lu",
|
fprintf(stderr, "%% %s:%s/%lu at clause %lu",
|
||||||
RepAtom(AtomOfTerm(pred_module))->StrOfAE,
|
RepAtom(AtomOfTerm(pred_module))->StrOfAE,
|
||||||
RepAtom(pred_name)->StrOfAE, (unsigned long int)pred_arity,
|
RepAtom(pred_name)->StrOfAE, (unsigned long int)pred_arity,
|
||||||
(unsigned long int)cl);
|
(unsigned long int)cl);
|
||||||
|
Reference in New Issue
Block a user