MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / db_debug

Function db_debug

other_src/lua/src/ldblib.cpp:308–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

luaL_loadbufferFunction · 0.70
lua_pcallFunction · 0.70
lua_settopFunction · 0.70

Tested by

no test coverage detected