mirror of
https://github.com/nmap/nmap.git
synced 2026-02-02 19:49:11 +00:00
Restore the dump_stack routine, it's really useful for debugging.
This commit is contained in:
@@ -140,6 +140,16 @@ void lua_report(lua_State *L, char *prefix, int panic)
|
||||
loguser("%s: %s.", prefix, errormsg);
|
||||
}
|
||||
|
||||
void dump_stack(lua_State *L, char* title) {
|
||||
int i;
|
||||
logdebug("DUMPING THE STACK title=%s.\n", title);
|
||||
for (i = 1; i <= lua_gettop(L); ++i) {
|
||||
fprintf(stderr, "%d %s %s\n", i, luaL_typename(L, i), luaL_tolstring(L, i, 0));
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
logdebug("END OF DUMP.\n\n");
|
||||
}
|
||||
|
||||
static int traceback (lua_State *L)
|
||||
{
|
||||
const char *msg;
|
||||
|
||||
Reference in New Issue
Block a user