aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-06 14:44:06 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-06 14:44:06 -0300
commit8a3a49250ce4a7e46ec9e90810a61d9f97aece3d (patch)
tree30e74ca48fef2b7ac93b7e0c7f5a47c8acc4449d
parent1ec251e091302515e54aa81d965840a5de4be0a1 (diff)
downloadlua-8a3a49250ce4a7e46ec9e90810a61d9f97aece3d.tar.gz
lua-8a3a49250ce4a7e46ec9e90810a61d9f97aece3d.tar.bz2
lua-8a3a49250ce4a7e46ec9e90810a61d9f97aece3d.zip
Detail
Small improvement in line-tracing for internal debugging.
-rw-r--r--lvm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lvm.c b/lvm.c
index b6b18a69..73d7ee43 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1175,8 +1175,12 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1175 Instruction i; /* instruction being executed */ 1175 Instruction i; /* instruction being executed */
1176 vmfetch(); 1176 vmfetch();
1177 #if 0 1177 #if 0
1178 /* low-level line tracing for debugging Lua */ 1178 { /* low-level line tracing for debugging Lua */
1179 printf("line: %d\n", luaG_getfuncline(cl->p, pcRel(pc, cl->p))); 1179 #include "lopnames.h"
1180 int pcrel = pcRel(pc, cl->p);
1181 printf("line: %d; %s (%d)\n", luaG_getfuncline(cl->p, pcrel),
1182 opnames[GET_OPCODE(i)], pcrel);
1183 }
1180 #endif 1184 #endif
1181 lua_assert(base == ci->func.p + 1); 1185 lua_assert(base == ci->func.p + 1);
1182 lua_assert(base <= L->top.p && L->top.p <= L->stack_last.p); 1186 lua_assert(base <= L->top.p && L->top.p <= L->stack_last.p);