From db49b425c19627f1f22a68c917ef3033ab6d90aa Mon Sep 17 00:00:00 2001 From: david Date: Mon, 15 Sep 2008 06:43:16 +0000 Subject: [PATCH] Remove a debugging function, stack_dump, that I used to step through NSE code. Something like it should remain a part of NSE, because it helped me to see what was in the Lua stack inside GDB. I got the function from http://www.lua.org/pil/24.2.3.html. --- nse_init.cc | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/nse_init.cc b/nse_init.cc index 68dd4af03..49cb863a3 100644 --- a/nse_init.cc +++ b/nse_init.cc @@ -26,30 +26,6 @@ extern NmapOps o; extern int current_hosts; extern int errfunc; -void stack_dump(lua_State *L) { - int i; - int top = lua_gettop(L); - for (i = 1; i <= top; i++) { - int t = lua_type(L, i); - switch (t) { - case LUA_TSTRING: - printf("\"%s\"", lua_tostring(L, i)); - break; - case LUA_TBOOLEAN: - printf("%s", lua_toboolean(L, i) ? "true" : "false"); - break; - case LUA_TNUMBER: - printf("%g", lua_tonumber(L, i)); - break; - default: - printf("<%s>", lua_typename(L, t)); - break; - } - printf(" "); - } - printf("\n"); -} - /* int error_function (lua_State *L) * * Arguments: