MCPcopy Create free account
hub / github.com/defold/defold / db_debug

Function db_debug

engine/lua/src/lua/ldblib.c:301–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299
300
301static int db_debug (lua_State *L) {
302 for (;;) {
303 char buffer[250];
304 fputs("lua_debug> ", stderr);
305 if (fgets(buffer, sizeof(buffer), stdin) == 0 ||
306 strcmp(buffer, "cont\n") == 0)
307 return 0;
308 if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") ||
309 lua_pcall(L, 0, 0, 0)) {
310 fputs(lua_tostring(L, -1), stderr);
311 fputs("\n", stderr);
312 }
313 lua_settop(L, 0); /* remove eventual returns */
314 }
315}
316
317
318#define LEVELS1 12 /* size of the first part of the stack */

Callers

nothing calls this directly

Calls 3

luaL_loadbufferFunction · 0.85
lua_pcallFunction · 0.85
lua_settopFunction · 0.85

Tested by

no test coverage detected