From: John L. <jr...@us...> - 2007-11-28 22:55:06
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28670/wxLua/modules/wxluasocket/include Modified Files: wxldtarg.h Log Message: Use wxSIGKILL to kill debuggee process since wxSIGTERM doesn't work in MSW Made wxLuaCheckStack class work a little nicer for easier debugging in C++ Made wxluaT_insert(L, idx) not pop the value that it refs since it may not be the one at the top of the stack. Use wxLuaDebugData::GetTypeValue in wxLuaDebugTarget and other code cleanup in wxLuaDebugTarget Index: wxldtarg.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldtarg.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** wxldtarg.h 7 Aug 2007 20:23:26 -0000 1.25 --- wxldtarg.h 28 Nov 2007 22:55:02 -0000 1.26 *************** *** 84,87 **** --- 84,88 ---- wxArrayInt m_references; wxCriticalSection m_luaCriticalSection; + mutable wxCriticalSection m_breakPointListCriticalSection; // Enter/Leave critical section for the threaded sockets *************** *** 91,96 **** void ExitThread(); ! mutable wxCriticalSection m_breakPointListCriticalSection; wxString CreateBreakPoint(const wxString &fileName, int lineNumber) const; bool AddBreakPoint(const wxString &fileName, int lineNumber); --- 92,99 ---- void ExitThread(); ! // Return a string ("%d:%s", lineNumber, fileName) for the breakpoint wxString CreateBreakPoint(const wxString &fileName, int lineNumber) const; + // Are we at a set breakpoint? + bool AtBreakPoint(const wxString &fileName, int lineNumber) const; bool AddBreakPoint(const wxString &fileName, int lineNumber); *************** *** 118,129 **** bool NotifyEvaluateExpr(int exprRef, const wxString &strResult); bool DebugHook(int event); - private: bool IsConnected(bool wait_for_connect = true) const; - bool AtBreakPoint(const wxString &fileName, int lineNumber) const; - wxString GetDebugInfo(int &lineNumber) const; static void LUACALL LuaDebugHook(lua_State *L, lua_Debug *debug); static int LUACALL LuaPrint (lua_State *L); }; --- 121,135 ---- bool NotifyEvaluateExpr(int exprRef, const wxString &strResult); + // Handle events from the static wxLuaDebugTarget::LuaDebugHook bool DebugHook(int event); bool IsConnected(bool wait_for_connect = true) const; + // Get the wxLuaDebugTarget that was pushed into Lua + static wxLuaDebugTarget* GetDebugTarget(lua_State* L); + + // Handle the events from lua_sethook() static void LUACALL LuaDebugHook(lua_State *L, lua_Debug *debug); + // Forward the print statements to NotifyPrint() static int LUACALL LuaPrint (lua_State *L); }; |