summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authordcs <dcs@FreeBSD.org>1999-04-06 02:43:06 +0000
committerdcs <dcs@FreeBSD.org>1999-04-06 02:43:06 +0000
commit998b9c95ea9b247a6f8baee91702e7eb2dd05965 (patch)
treef0cc0110d38ecb0e25bc73bb8f139f5787f6d687 /sys/boot
parentac4f7c6b4046a2365042b1c44ac0f69436eae820 (diff)
downloadFreeBSD-src-998b9c95ea9b247a6f8baee91702e7eb2dd05965.zip
FreeBSD-src-998b9c95ea9b247a6f8baee91702e7eb2dd05965.tar.gz
Reactivate trace! after making it egcs-friendly.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/ficl/Makefile4
-rw-r--r--sys/boot/ficl/ficl.c25
2 files changed, 16 insertions, 13 deletions
diff --git a/sys/boot/ficl/Makefile b/sys/boot/ficl/Makefile
index 74eca13..ab10716 100644
--- a/sys/boot/ficl/Makefile
+++ b/sys/boot/ficl/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.8 1999/02/04 17:13:30 dcs Exp $
+# $Id: Makefile,v 1.9 1999/03/17 23:03:36 dcs Exp $
#
LIB= ficl
NOPROFILE= yes
@@ -14,7 +14,7 @@ SOFTWORDS= softcore.fr jhlocal.fr marker.fr freebsd.fr
#SOFTWORDS+= oo.fr classes.fr
.PATH: ${.CURDIR}/softwords
-CFLAGS+= -I${.CURDIR} # -DFICL_TRACE
+CFLAGS+= -I${.CURDIR} -DFICL_TRACE
softcore.c: ${SOFTWORDS} softcore.awk
(cd ${.CURDIR}/softwords; cat ${SOFTWORDS} | awk -f softcore.awk) > ${.TARGET}
diff --git a/sys/boot/ficl/ficl.c b/sys/boot/ficl/ficl.c
index 2dada3d..9274c1b 100644
--- a/sys/boot/ficl/ficl.c
+++ b/sys/boot/ficl/ficl.c
@@ -176,6 +176,9 @@ int ficlBuild(char *name, FICL_CODE code, char flags)
**************************************************************************/
int ficlExec(FICL_VM *pVM, char *pText, INT32 size)
{
+#ifdef FICL_TRACE
+ extern int isAFiclWord(FICL_WORD *pFW);
+#endif
int except;
FICL_WORD *tempFW;
jmp_buf vmState;
@@ -230,7 +233,7 @@ int ficlExec(FICL_VM *pVM, char *pText, INT32 size)
if (tempFW->code == literalParen)
{
- c = *(pVM->ip);
+ c = *PTRtoCELL(pVM->ip);
if (isAFiclWord(c.p))
{
FICL_WORD *pLit = (FICL_WORD *)c.p;
@@ -242,12 +245,12 @@ int ficlExec(FICL_VM *pVM, char *pText, INT32 size)
}
else if (tempFW->code == stringLit)
{
- FICL_STRING *sp = (FICL_STRING *)(void *)pVM->ip;
+ FICL_STRING *sp = PTRtoSTRING(pVM->ip);
sprintf(buffer, " s\" %.*s\"", sp->count, sp->text);
}
else if (tempFW->code == ifParen)
{
- c = *pVM->ip;
+ c = *PTRtoCELL(pVM->ip);
if (c.i > 0)
sprintf(buffer, " if / while (branch rel %ld)", c.i);
else
@@ -255,7 +258,7 @@ int ficlExec(FICL_VM *pVM, char *pText, INT32 size)
}
else if (tempFW->code == branchParen)
{
- c = *pVM->ip;
+ c = *PTRtoCELL(pVM->ip);
if (c.i > 0)
sprintf(buffer, " else (branch rel %ld)", c.i);
else
@@ -263,23 +266,23 @@ int ficlExec(FICL_VM *pVM, char *pText, INT32 size)
}
else if (tempFW->code == qDoParen)
{
- c = *pVM->ip;
+ c = *PTRtoCELL(pVM->ip);
sprintf(buffer, " ?do (leave abs %#lx)", c.u);
}
else if (tempFW->code == doParen)
{
- c = *pVM->ip;
+ c = *PTRtoCELL(pVM->ip);
sprintf(buffer, " do (leave abs %#lx)", c.u);
}
else if (tempFW->code == loopParen)
{
- c = *pVM->ip;
- sprintf(buffer, " loop (branch rel %#ld)", c.i);
+ c = *PTRtoCELL(pVM->ip);
+ sprintf(buffer, " loop (branch rel %ld)", c.i);
}
else if (tempFW->code == plusLoopParen)
{
- c = *pVM->ip;
- sprintf(buffer, " +loop (branch rel %#ld)", c.i);
+ c = *PTRtoCELL(pVM->ip);
+ sprintf(buffer, " +loop (branch rel %ld)", c.i);
}
else /* default: print word's name */
{
@@ -292,7 +295,7 @@ int ficlExec(FICL_VM *pVM, char *pText, INT32 size)
* - punt and print value
*/
{
- sprintf(buffer, " %ld (%#lx)", ((CELL*)pVM->ip)->i, ((CELL*)pVM->ip)->u);
+ sprintf(buffer, " %ld (%#lx)", (PTRtoCELL(pVM->ip))->i, (PTRtoCELL(pVM->ip))->u);
vmTextOut(pVM, buffer, 1);
}
#endif FICL_TRACE
OpenPOWER on IntegriCloud