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

Function db_debug

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

Source from the content-addressed store, hash-verified

421
422
423static int db_debug (lua_State *L) {
424 for (;;) {
425 char buffer[250];
426 lua_writestringerror("%s", "lua_debug> ");
427 if (fgets(buffer, sizeof(buffer), stdin) == NULL ||
428 strcmp(buffer, "cont\n") == 0)
429 return 0;
430 if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") ||
431 lua_pcall(L, 0, 0, 0))
432 lua_writestringerror("%s\n", luaL_tolstring(L, -1, NULL));
433 lua_settop(L, 0); /* remove eventual returns */
434 }
435}
436
437
438static int db_traceback (lua_State *L) {

Callers

nothing calls this directly

Calls 4

luaL_loadbufferFunction · 0.85
luaL_tolstringFunction · 0.70
lua_settopFunction · 0.70
lua_pcallFunction · 0.50

Tested by

no test coverage detected