MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / lua_getinfo

Function lua_getinfo

third-party/lua-5.5.0/src/ldebug.c:395–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393
394
395LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) {
396 int status;
397 Closure *cl;
398 CallInfo *ci;
399 TValue *func;
400 lua_lock(L);
401 if (*what == '>') {
402 ci = NULL;
403 func = s2v(L->top.p - 1);
404 api_check(L, ttisfunction(func), "function expected");
405 what++; /* skip the '>' */
406 L->top.p--; /* pop function */
407 }
408 else {
409 ci = ar->i_ci;
410 func = s2v(ci->func.p);
411 lua_assert(ttisfunction(func));
412 }
413 cl = ttisclosure(func) ? clvalue(func) : NULL;
414 status = auxgetinfo(L, what, ar, cl, ci);
415 if (strchr(what, 'f')) {
416 setobj2s(L, L->top.p, func);
417 api_incr_top(L);
418 }
419 if (strchr(what, 'L'))
420 collectvalidlines(L, cl);
421 lua_unlock(L);
422 return status;
423}
424
425
426/*

Callers 13

pushglobalfuncnameFunction · 0.70
luaL_tracebackFunction · 0.70
luaL_argerrorFunction · 0.70
luaL_whereFunction · 0.70
db_getinfoFunction · 0.70
hookfFunction · 0.70
GetStacksMethod · 0.50
DisplayFunctionFunction · 0.50
CreateEnvMethod · 0.50
GetStackLevelMethod · 0.50
FindBreakPointMethod · 0.50
StartMethod · 0.50

Calls 2

auxgetinfoFunction · 0.70
collectvalidlinesFunction · 0.70

Tested by

no test coverage detected