diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-06 14:44:06 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-06 14:44:06 -0300 |
commit | 8a3a49250ce4a7e46ec9e90810a61d9f97aece3d (patch) | |
tree | 30e74ca48fef2b7ac93b7e0c7f5a47c8acc4449d | |
parent | 1ec251e091302515e54aa81d965840a5de4be0a1 (diff) | |
download | lua-8a3a49250ce4a7e46ec9e90810a61d9f97aece3d.tar.gz lua-8a3a49250ce4a7e46ec9e90810a61d9f97aece3d.tar.bz2 lua-8a3a49250ce4a7e46ec9e90810a61d9f97aece3d.zip |
Detail
Small improvement in line-tracing for internal debugging.
-rw-r--r-- | lvm.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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); |