Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25513/wxLua/modules/wxluadebug/src
Modified Files:
wxldebug.cpp
Log Message:
comment why we remove items from the stack before calling our C functions
make wxLuaCheckStack::DumpStack a little nicer by printing types and values
Index: wxldebug.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** wxldebug.cpp 12 Dec 2006 01:23:40 -0000 1.25
--- wxldebug.cpp 19 Mar 2007 21:56:11 -0000 1.26
***************
*** 527,528 ****
--- 527,547 ----
wxLog::FlushActive();
}
+
+ void wxLuaCheckStack::DumpStack(lua_State* L)
+ {
+ int i, count = lua_gettop(L);
+ wxPrintf(wxT("wxLuaCheckStack::DumpStack(%ld) items %d\n"), (long)L, count);
+
+ wxLuaState wxlState(L);
+
+ for (i = 1; i <= count; i++)
+ {
+ //int type = lua_type(L, i);
+ //wxPrintf(wxT("Stack item %d of %d : type %d '%s'\n"), i, argCount, type, lua2wx(lua_typename(L, type)).c_str());
+
+ wxString type, value;
+ int i_type = wxLuaDebugData::GetTypeValue(wxlState, i, type, value);
+ wxPrintf(wxT("item %d: i_type %d '%s' = '%s'\n"), i, i_type, type.c_str(), value.c_str());
+
+ }
+ }
|