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

Function db_debug

third-party/lua-5.1.5/src/ldblib.c:302–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300
301
302static int db_debug (lua_State *L) {
303 for (;;) {
304 char buffer[250];
305 fputs("lua_debug> ", stderr);
306 if (fgets(buffer, sizeof(buffer), stdin) == 0 ||
307 strcmp(buffer, "cont\n") == 0)
308 return 0;
309 if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") ||
310 lua_pcall(L, 0, 0, 0)) {
311 fputs(lua_tostring(L, -1), stderr);
312 fputs("\n", stderr);
313 }
314 lua_settop(L, 0); /* remove eventual returns */
315 }
316}
317
318
319#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.70
lua_settopFunction · 0.70

Tested by

no test coverage detected