From: John L. <jr...@us...> - 2006-12-08 06:16:21
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8247/wxLua/modules/wxluasocket/include Modified Files: wxldserv.h Log Message: subclass the wxProcess in the debugger so we don't have to send an event fixes crashes when an error occurs in the debugger's lua program test compile lua programs before running or debugging to catch syntax errors Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** wxldserv.h 1 Dec 2006 23:40:27 -0000 1.25 --- wxldserv.h 8 Dec 2006 06:16:17 -0000 1.26 *************** *** 126,129 **** --- 126,147 ---- // ---------------------------------------------------------------------------- + // wxLuaDebuggerProcess - handle OnTerminate gracefully + // ---------------------------------------------------------------------------- + + class wxLuaDebuggerProcess : public wxProcess + { + public: + // Don't use the debugger as the event handler since we don't want + // problems when this may exist when the debugger is being deleted. + wxLuaDebuggerProcess(wxLuaDebuggerBase* debugger, wxWindowID id) + : wxProcess(NULL, id), m_debugger(debugger) {} + + // don't send event, but delete this and NULL debugger's pointer to this + virtual void OnTerminate(int pid, int status); + + wxLuaDebuggerBase* m_debugger; + }; + + // ---------------------------------------------------------------------------- // wxLuaDebuggerBase - Socket debugger interface base class. // This base class sends wxLUASOCKET_DEBUGGER_CMD_XXX commands through the *************** *** 215,226 **** protected: ! int m_port_number; // the socket port to listen to ! wxLuaStackDialog *m_stackDialog; // the stack dialog to ! wxProcess *m_debuggeeProcess; // wxProcess of the debuggee ! long m_debuggeeProcessID; // id of the debuggee wxProcess static wxString sm_programName; // name of the program to run for debuggee static wxString sm_networkName; // name of the network to use for the debuggee private: DECLARE_EVENT_TABLE(); --- 233,246 ---- protected: ! int m_port_number; // the socket port to listen to ! wxLuaStackDialog *m_stackDialog; // the stack dialog to ! wxLuaDebuggerProcess *m_debuggeeProcess; // wxProcess of the debuggee ! long m_debuggeeProcessID; // id of the debuggee wxProcess static wxString sm_programName; // name of the program to run for debuggee static wxString sm_networkName; // name of the network to use for the debuggee + friend class wxLuaDebuggerProcess; + private: DECLARE_EVENT_TABLE(); |