MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / stack_trace

Function stack_trace

lua/sp.c:1666–1682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1664}
1665
1666static void stack_trace(lua_State *lua)
1667{
1668 lua_getfield(lua, LUA_GLOBALSINDEX, "debug");
1669 if (!lua_istable(lua, -1)) {
1670 lua_pop(lua, 1);
1671 return;
1672 }
1673 lua_getfield(lua, -1, "traceback");
1674 if (!lua_isfunction(lua, -1)) {
1675 lua_pop(lua, 2);
1676 return;
1677 }
1678 lua_pushvalue(lua, 1);
1679 lua_pushinteger(lua, 2);
1680 lua_call(lua, 2, 1);
1681 logmsg(LOGMSG_USER, "\n");
1682}
1683
1684static char *no_such_procedure(const char *name, struct spversion_t *spversion)
1685{

Callers 1

Calls 5

lua_getfieldFunction · 0.85
lua_pushvalueFunction · 0.85
lua_pushintegerFunction · 0.85
lua_callFunction · 0.85
logmsgFunction · 0.50

Tested by

no test coverage detected