From 8a3a49250ce4a7e46ec9e90810a61d9f97aece3d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 6 Jan 2025 14:44:06 -0300 Subject: Detail Small improvement in line-tracing for internal debugging. --- lvm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lvm.c') 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) { 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); -- cgit v1.2.3-55-g6feb