MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / db_debug

Function db_debug

Source/Misc/lua/src/lua.c:11818–11832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11816
11817
11818static int db_debug (lua_State *L) {
11819for (;;) {
11820char buffer[250];
11821fputs("lua_debug> ", stderr);
11822if (fgets(buffer, sizeof(buffer), stdin) == 0 ||
11823strcmp(buffer, "cont\n") == 0)
11824return 0;
11825if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") ||
11826lua_pcall(L, 0, 0, 0)) {
11827fputs(lua_tostring(L, -1), stderr);
11828fputs("\n", stderr);
11829}
11830lua_settop(L, 0); /* remove eventual returns */
11831}
11832}
11833
11834
11835#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