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

Function DisplayFunction

emmy_debugger/src/debugger/emmy_debugger.cpp:342–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342void DisplayFunction(Idx<Variable> variable, lua_State *L, int index) {
343 lua_Debug ar{};
344 lua_pushvalue(L, index);
345 if (lua_getinfo(L, ">Snu", &ar) == 0) {
346 variable->value = ToPointer(L, index);
347 }
348 else {
349 switch (luaVersion) {
350 case LuaVersion::LUA_54: {
351 DisplayFunction54(variable, L, index, ar.u.ar54);
352 break;
353 }
354 default: {
355 variable->value = ToPointer(L, index);
356 break;
357 }
358 }
359 }
360 lua_settop(L, index);
361}
362#endif
363// algorithm optimization
364void Debugger::GetVariable(lua_State *L, Idx<Variable> variable, int index, int depth, bool queryHelper) {

Callers 1

GetVariableMethod · 0.85

Calls 5

ToPointerFunction · 0.85
DisplayFunction54Function · 0.85
lua_pushvalueFunction · 0.50
lua_getinfoFunction · 0.50
lua_settopFunction · 0.50

Tested by

no test coverage detected