MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / db_debug

Function db_debug

lib/lua/src/ldblib.c:420–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

luaL_tolstringFunction · 0.85
lua_settopFunction · 0.85

Tested by

no test coverage detected