1
0
mirror of https://github.com/lua/lua synced 2026-06-08 15:34:49 +00:00
Small improvement in line-tracing for internal debugging.
This commit is contained in:
Roberto Ierusalimschy
2025-01-06 14:44:06 -03:00
parent 1ec251e091
commit 8a3a49250c
+6 -2
View File
@@ -1175,8 +1175,12 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
Instruction i; /* instruction being executed */
vmfetch();
#if 0
/* low-level line tracing for debugging Lua */
printf("line: %d\n", luaG_getfuncline(cl->p, pcRel(pc, cl->p)));
{ /* low-level line tracing for debugging Lua */
#include "lopnames.h"
int pcrel = pcRel(pc, cl->p);
printf("line: %d; %s (%d)\n", luaG_getfuncline(cl->p, pcrel),
opnames[GET_OPCODE(i)], pcrel);
}
#endif
lua_assert(base == ci->func.p + 1);
lua_assert(base <= L->top.p && L->top.p <= L->stack_last.p);