wxldserv.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////
00002 // Purpose:     Implements the debugger end of wxLua debugging session
00003 // Author:      J. Winwood, John Labenski, Ray Gilbert
00004 // Created:     May 2002
00005 // Copyright:   (c) 2002 Lomtick Software. All rights reserved.
00006 // Licence:     wxWidgets licence
00007 /////////////////////////////////////////////////////////////////////////////
00008 
00009 #ifndef WX_LUA_DEBUG_SERVER_H
00010 #define WX_LUA_DEBUG_SERVER_H
00011 
00012 #include "wx/process.h"
00013 #include "wx/thread.h"
00014 #include "wxluasocket/include/wxluasocketdefs.h"
00015 #include "wxluasocket/include/wxlsock.h"
00016 #include "wxluadebug/include/wxldebug.h"
00017 #include "wxluadebug/include/wxlstack.h"
00018 
00019 class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggerBase;
00020 class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggerEvent;
00021 
00022 // ----------------------------------------------------------------------------
00023 // wxWindowIds of components used for the debugger
00024 // ----------------------------------------------------------------------------
00025 
00026 enum
00027 {
00028     ID_WXLUASOCKET_DEBUGGEE_PROCESS = 1500 // id of the spawned debuggee wxProcess
00029 };
00030 
00031 // ----------------------------------------------------------------------------
00032 // wxLuaSocketDebuggeeEvents_Type - These are socket events sent from debuggee
00033 //   to debugger to notify the debugger that action has been taken which was
00034 //   probably the result of a previously received
00035 //   wxLuaSocketDebuggerCommands_Type.
00036 //   These socket events should be sent with wxLuaSocketBase::Read/WriteCmd()
00037 // ----------------------------------------------------------------------------
00038 
00039 enum wxLuaSocketDebuggeeEvents_Type
00040 {
00041     wxLUASOCKET_DEBUGGEE_EVENT_NONE = 0, // a socket error probably
00042 
00043     wxLUASOCKET_DEBUGGEE_EVENT_BREAK,
00044     wxLUASOCKET_DEBUGGEE_EVENT_PRINT,
00045     wxLUASOCKET_DEBUGGEE_EVENT_ERROR,
00046     wxLUASOCKET_DEBUGGEE_EVENT_EXIT,
00047     wxLUASOCKET_DEBUGGEE_EVENT_STACK_ENUM,
00048     wxLUASOCKET_DEBUGGEE_EVENT_STACK_ENTRY_ENUM,
00049     wxLUASOCKET_DEBUGGEE_EVENT_TABLE_ENUM,
00050     wxLUASOCKET_DEBUGGEE_EVENT_EVALUATE_EXPR,
00051 
00052     wxLUASOCKET_DEBUGGEE_EVENT__COUNT
00053 };
00054 
00055 // ----------------------------------------------------------------------------
00056 // wxLuaSocketDebuggerCommands_Type - These are socket commands sent from the
00057 //   debugger to debuggee to direct the debuggee to take action, which will
00058 //   then return with a wxLuaSocketDebuggeeEvents_Type when done.
00059 //   These socket commands should be sent with wxLuaSocketBase::Read/WriteCmd()
00060 // ----------------------------------------------------------------------------
00061 
00062 enum wxLuaSocketDebuggerCommands_Type
00063 {
00064     wxLUASOCKET_DEBUGGER_CMD_NONE = 0, // a socket error probably
00065 
00066     wxLUASOCKET_DEBUGGER_CMD_ADD_BREAKPOINT = 100, // shifted for debugging
00067     wxLUASOCKET_DEBUGGER_CMD_REMOVE_BREAKPOINT,
00068     wxLUASOCKET_DEBUGGER_CMD_DISABLE_BREAKPOINT,
00069     wxLUASOCKET_DEBUGGER_CMD_ENABLE_BREAKPOINT,
00070     wxLUASOCKET_DEBUGGER_CMD_CLEAR_ALL_BREAKPOINTS,
00071     wxLUASOCKET_DEBUGGER_CMD_RUN_BUFFER,
00072     wxLUASOCKET_DEBUGGER_CMD_DEBUG_STEP,
00073     wxLUASOCKET_DEBUGGER_CMD_DEBUG_STEPOVER,
00074     wxLUASOCKET_DEBUGGER_CMD_DEBUG_STEPOUT,
00075     wxLUASOCKET_DEBUGGER_CMD_DEBUG_CONTINUE,
00076     wxLUASOCKET_DEBUGGER_CMD_DEBUG_BREAK,
00077     wxLUASOCKET_DEBUGGER_CMD_RESET,
00078     wxLUASOCKET_DEBUGGER_CMD_ENUMERATE_STACK,
00079     wxLUASOCKET_DEBUGGER_CMD_ENUMERATE_STACK_ENTRY,
00080     wxLUASOCKET_DEBUGGER_CMD_ENUMERATE_TABLE_REF,
00081     wxLUASOCKET_DEBUGGER_CMD_CLEAR_DEBUG_REFERENCES,
00082     wxLUASOCKET_DEBUGGER_CMD_EVALUATE_EXPR,
00083 };
00084 
00085 // ----------------------------------------------------------------------------
00086 // wxLuaDebuggerStackDialog - a wxLuaStackDialog for the wxLuaDebuggerBase.
00087 //   Use the function wxLuaDebuggerBase::DisplayStackDialog() to create
00088 //   and show one of these.
00089 //
00090 // Note: The wxLuaStackDialog is created by the debugger process and uses
00091 //   the overridden EnumerateXXX functions to get the wxLuaDebugData through the
00092 //   socket connection to the debuggee using the wxLuaDebuggerBase.
00093 // Note: The wxLuaState of the wxLuaStackDialog is not used in this case
00094 //   since it 'exists' in the independent debuggee process.
00095 // ----------------------------------------------------------------------------
00096 
00097 class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggerStackDialog : public wxLuaStackDialog
00098 {
00099 public:
00100     wxLuaDebuggerStackDialog(wxLuaDebuggerBase* luaDebugger,
00101                              wxWindow* parent, wxWindowID id = wxID_ANY,
00102                              const wxString& title = wxT("wxLua Stack"),
00103                              const wxPoint& pos = wxDefaultPosition,
00104                              const wxSize& size = wxDefaultSize);
00105 
00106     virtual ~wxLuaDebuggerStackDialog();
00107 
00108     // overridden functions for the wxLuaStackDialog that forward to the
00109     //  wxLuaDebuggerBase, they return through a wxLuaDebuggerEvent and the
00110     //  wxLuaDebuggerBase::OnDebugStackEnum, OnDebugTableEnum, OnDebugStackEntryEnum
00111     //  functions that then call the FillXXX functions.
00112     virtual void EnumerateStack();
00113     virtual void EnumerateStackEntry(int nEntry);
00114     virtual void EnumerateTable(int nRef, int nEntry, long lc_item);
00115     virtual void EnumerateGlobalData(long lc_item);
00116 
00117     // implementation
00118 
00119     wxLuaDebuggerBase* m_luaDebugger;
00120 
00121 private:
00122     DECLARE_ABSTRACT_CLASS(wxLuaDebuggerStackDialog)
00123 };
00124 
00125 // ----------------------------------------------------------------------------
00126 // wxLuaDebuggerProcess - The wxProcess from wxExecute to run a
00127 //    wxLuaDebugTarget as a debuggee. It handles OnTerminate gracefully.
00128 // ----------------------------------------------------------------------------
00129 
00130 class wxLuaDebuggerProcess : public wxProcess
00131 {
00132 public:
00133     // Don't use the debugger as the event handler since we don't want
00134     //   problems when this may exist when the debugger is being deleted.
00135     wxLuaDebuggerProcess(wxLuaDebuggerBase* debugger, wxWindowID id)
00136         : wxProcess(NULL, id), m_debugger(debugger) {}
00137 
00138     // don't send event, but delete this and NULL debugger's pointer to this
00139     virtual void OnTerminate(int pid, int status);
00140 
00141     wxLuaDebuggerBase* m_debugger;
00142 };
00143 
00144 // ----------------------------------------------------------------------------
00145 // wxLuaDebuggerBase - Socket debugger interface base class.
00146 //  This base class sends wxLUASOCKET_DEBUGGER_CMD_XXX commands through the
00147 //  socket to the debuggee. The debuggee then responds through the socket with
00148 //  a wxLUASOCKET_DEBUGGEE_EVENT_XXX event which is turned into a
00149 //  wxLuaDebuggerEvent of type wxEVT_WXLUA_DEBUGGER_XXX which is processed by
00150 //  this class. Use wxEvtHandler::Connect(...) (or subclass and use an event
00151 //  table) to intercept these events and act on them.
00152 // ----------------------------------------------------------------------------
00153 
00154 class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggerBase : public wxEvtHandler
00155 {
00156 public:
00157     wxLuaDebuggerBase(int port_number);
00158     virtual ~wxLuaDebuggerBase();
00159 
00160     // Start the debugger server to listen for a debuggee. After creation
00161     //  you must call StartServer to actually start the server. returns success
00162     virtual bool StartServer() = 0;
00163     // Stop the debugger server, returns success
00164     virtual bool StopServer() = 0;
00165     // Start a debuggee client to be debugged by this, returns success
00166     // By default it starts a new wxLuaDebuggerProcess
00167     virtual long StartClient();
00168 
00169     // These functions all send socket commands wxLUASOCKET_DEBUGGER_CMD_XXX
00170     // and the appropriate data to the debuggee.
00171 
00172     bool AddBreakPoint(const wxString &fileName, int lineNumber);
00173     bool RemoveBreakPoint(const wxString &fileName, int lineNumber);
00174     bool DisableBreakPoint(const wxString &fileName, int lineNumber);
00175     bool EnableBreakPoint(const wxString &fileName, int lineNumber);
00176     bool ClearAllBreakPoints();
00177     bool Run(const wxString &fileName, const wxString &buffer);
00178     bool Step();
00179     bool StepOver();
00180     bool StepOut();
00181     bool Continue();
00182     bool Break();
00183     bool Reset();
00184     bool EnumerateStack();
00185     bool EnumerateStackEntry(int stackEntry);
00186     bool EnumerateTable(int tableRef, int nIndex, long nItemNode);
00187     bool ClearDebugReferences();
00188     bool EvaluateExpr(int exprRef, const wxString &strExpression);
00189 
00190     // Handle the wxLuaSocketDebuggeeEvents_Type event sent by the debuggee.
00191     //   returns the input event_type if ok or -1 on error
00192     // On success a wxLuaDebuggerEvent is generated with the equivalent
00193     // wxEVT_WXLUA_DEBUGGER_XXX to the input wxLUASOCKET_DEBUGGEE_EVENT_XXX
00194     virtual int HandleDebuggeeEvent(int event_type);
00195 
00196     // Get the debugger socket to read/write data to the debuggee
00197     virtual wxLuaSocketBase* GetSocketBase() = 0;
00198     // Check if the socket is connected and if not send a
00199     //   wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED event with a socket error msg
00200     virtual bool CheckSocketConnected(bool send_event = true, const wxString& msg = wxEmptyString);
00201     // Check if the input is true (ie. return of a socket read) and if not send a
00202     //   wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED with a read error msg
00203     virtual bool CheckSocketRead(bool read_ok, const wxString& msg = wxEmptyString);
00204     // Check if the input is true (eg. return of a socket write) and if not send a
00205     //   wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED with a write error msg
00206     virtual bool CheckSocketWrite(bool write_ok, const wxString& msg = wxEmptyString);
00207 
00208     // Get the socket error message or ""
00209     virtual wxString GetSocketErrorMsg() = 0;
00210 
00211     // Send the event to this wxEvtHandler
00212     virtual void SendEvent(wxEvent& event) { AddPendingEvent(event); }
00213 
00214     // Get/Set the wxLuaStackDialog to show the stack of the debugged program
00215     wxLuaStackDialog* GetStackDialog() { return m_stackDialog; }
00216     void SetStackDialog(wxLuaStackDialog *stackDialog) { m_stackDialog = stackDialog; }
00217     // Create and display a wxLuaDebuggerStackDialog for the debuggee process
00218     bool DisplayStackDialog(wxWindow *parent, wxWindowID id = wxID_ANY);
00219 
00220     // Handle the stack dialog events using the internal wxLuaStackDialog
00221     void OnDebugStackEnum(wxLuaDebuggerEvent &event);
00222     void OnDebugTableEnum(wxLuaDebuggerEvent &event);
00223     void OnDebugStackEntryEnum(wxLuaDebuggerEvent &event);
00224 
00225     // Handle the wxProcess debuggee termination
00226     void OnEndDebugeeProcess(wxProcessEvent& event);
00227 
00228     // Get the port number the socket is using
00229     int GetPortNumber() const { return m_port_number; }
00230 
00231     // Get the wxLuaDebuggerProcess used to run the debuggee in
00232     wxLuaDebuggerProcess* GetDebuggeeProcess() { return m_debuggeeProcess; }
00233     long GetDebuggeeProcessId() const { return m_debuggeeProcessID; }
00234     bool KillDebuggee();
00235 
00236     // Set the program name to start the debuggee target with
00237     // Note: If the the program name is empty when this class is created, it
00238     //       will be initialized to wxGetApp().argv[0].
00239     //       If you set it to some other value it will not be changed.
00240     static void SetProgramName(const wxString& name) { sm_programName = name; }
00241     static wxString GetProgramName() { return sm_programName; }
00242 
00243     // Get/Set the network name to use to start the debuggee target with.
00244     // Note: If the the network name is empty when this class is created, it
00245     //       will be initialized to wxGetHostName() in MSW and 'localhost' in UNIX.
00246     //       If you set it to some other value it will not be changed.
00247     static void SetNetworkName(const wxString& name) { sm_networkName = name; }
00248     static wxString GetNetworkName() { return sm_networkName; }
00249 
00250     // implementation
00251 
00252     int                   m_port_number;       // the socket port to listen to
00253     wxLuaStackDialog     *m_stackDialog;       // the stack dialog to
00254     wxLuaDebuggerProcess *m_debuggeeProcess;   // wxProcess of the debuggee
00255     long                  m_debuggeeProcessID; // id of the debuggee wxProcess
00256 
00257     wxCriticalSection     m_acceptSockCritSect; // for deleting accepted socket
00258     wxCriticalSection     m_processCritSect;    // for deleting the client process
00259 
00260     static wxString sm_programName; // name of the program to run for debuggee
00261     static wxString sm_networkName; // name of the network to use for the debuggee
00262 
00263     friend class wxLuaDebuggerProcess;
00264 
00265 private:
00266     DECLARE_EVENT_TABLE();
00267     DECLARE_ABSTRACT_CLASS(wxLuaDebuggerBase)
00268 };
00269 
00270 #define WXLUASOCKET_USE_C_SOCKET
00271 #ifdef WXLUASOCKET_USE_C_SOCKET
00272 
00273 // ----------------------------------------------------------------------------
00274 // wxLuaDebuggerCServer - a socket server for a Lua program to communicate with a
00275 //                        wxLuaDebugTarget run in C++.
00276 // ----------------------------------------------------------------------------
00277 
00278 class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggerCServer : public wxLuaDebuggerBase
00279 {
00280 protected:
00281     // ----------------------------------------------------------------------------
00282     // wxLuaDebuggerCServer::LuaThread - a wxThread for the wxLuaDebuggerCServer
00283     // ----------------------------------------------------------------------------
00284     class LuaThread : public wxThread
00285     {
00286         public:
00287             LuaThread(wxLuaDebuggerCServer *pServer) : wxThread(wxTHREAD_JOINABLE),
00288                                                        m_pServer(pServer) {}
00289 
00290             virtual void *Entry();   // thread execution starts here
00291             virtual void OnExit();   // called when the thread exits
00292 
00293             wxLuaDebuggerCServer *m_pServer;
00294     };
00295 
00296 public:
00297     wxLuaDebuggerCServer(int port_number);
00298     virtual ~wxLuaDebuggerCServer();
00299 
00300     // Start the debugger server to listen for a debuggee. After creation
00301     //  you must call StartServer to actually start the server. returns success
00302     virtual bool StartServer();
00303     // Stop the debugger server, returns success
00304     virtual bool StopServer();
00305     // Start a debuggee client to be debugged by this, returns process ID
00306     //   is > 0 on success.
00307     virtual long StartClient();
00308 
00309     virtual wxLuaSocketBase* GetSocketBase() { return m_acceptedSocket; }
00310 
00311     virtual wxString GetSocketErrorMsg();
00312 
00313     // implementation
00314 
00315     // The thread function for the running LuaThread, only to be called by the
00316     //   thread.
00317     void ThreadFunction();
00318 
00319     bool WaitForConnect(int timeOut);
00320 
00321     wxLuaSocket      *m_serverSocket;
00322     wxLuaSocket      *m_acceptedSocket;
00323     wxLuaDebuggerCServer::LuaThread *m_pThread;
00324     bool              m_shutdown;
00325 
00326 private:
00327     DECLARE_ABSTRACT_CLASS(wxLuaDebuggerCServer)
00328 };
00329 
00330 typedef wxLuaDebuggerCServer wxLuaDebuggerServer;
00331 
00332 #else // !WXLUASOCKET_USE_C_SOCKET
00333 
00334 // ----------------------------------------------------------------------------
00335 // wxLuaDebuggerwxServer - a socket server for a Lua program to communicate with a
00336 //                    wxLuaDebugTarget run in C++.
00337 // ----------------------------------------------------------------------------
00338 
00339 class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggerwxSocketServer : public wxLuaDebuggerBase
00340 {
00341 public:
00342     wxLuaDebuggerwxSocketServer(int port_number);
00343     virtual ~wxLuaDebuggerwxSocketServer();
00344 
00345     // Start the debugger server to listen for a debuggee. After creation
00346     //  you must call StartServer to actually start the server. returns success
00347     virtual bool StartServer();
00348     // Stop the debugger server, returns success
00349     virtual bool StopServer();
00350     // Start a debuggee client to be debugged by this, returns success
00351     virtual long StartClient();
00352 
00353     virtual wxLuaSocketBase* GetSocketBase() { return m_acceptedSocket; }
00354 
00355     virtual wxString GetSocketErrorMsg();
00356 
00357     // implementation
00358 
00359     virtual void SendEvent(wxEvent& event) { ProcessEvent(event); }
00360 
00361     void OnServerEvent(wxSocketEvent& event);
00362     void OnSocketEvent(wxSocketEvent& event);
00363 
00364 protected:
00365     wxSocketServer *m_serverSocket;
00366     wxLuawxSocket  *m_acceptedSocket;
00367 
00368 private:
00369     DECLARE_EVENT_TABLE();
00370     DECLARE_ABSTRACT_CLASS(wxLuaDebuggerwxSocketServer)
00371 };
00372 
00373 typedef wxLuaDebuggerwxSocketServer wxLuaDebuggerServer;
00374 
00375 #endif // WXLUASOCKET_USE_C_SOCKET
00376 
00377 // ----------------------------------------------------------------------------
00378 // wxLuaDebuggerEvent - wxEvent sent from the wxLuaDebuggerXXX to notify when
00379 // the debuggee has taken action or status of the debugger.
00380 // ----------------------------------------------------------------------------
00381 
00382 class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggerEvent : public wxEvent
00383 {
00384 public:
00385     wxLuaDebuggerEvent(const wxLuaDebuggerEvent& event);
00386     wxLuaDebuggerEvent(wxEventType eventType = wxEVT_NULL,
00387                        wxObject* eventObject = NULL,
00388                        int lineNumber = 0,
00389                        const wxString &fileName = wxEmptyString,
00390                        bool enabledFlag = false);
00391 
00392     void SetMessage(const wxString &message);
00393     void SetDebugData(long nReference, const wxLuaDebugData& pDebugData = wxNullLuaDebugData);
00394 
00395     int      GetLineNumber() const  { return m_line_number;}
00396     wxString GetFileName() const    { return m_fileName; }
00397     wxString GetMessage() const     { return m_strMessage; } // check HasMessage
00398     bool     HasMessage() const     { return m_has_message; }
00399     long     GetReference() const   { return m_lua_ref; }    // Lua reference
00400     wxLuaDebugData GetDebugData() const { return m_debugData; }
00401     bool     GetEnabledFlag() const { return m_enabled_flag; }
00402 
00403 protected:
00404     virtual wxEvent* Clone() const { return new wxLuaDebuggerEvent(*this); }
00405 
00406     int      m_line_number;
00407     wxString m_fileName;
00408     wxString m_strMessage;
00409     bool     m_has_message;
00410     long     m_lua_ref;
00411     wxLuaDebugData m_debugData;
00412     bool     m_enabled_flag;
00413 
00414 private:
00415     DECLARE_DYNAMIC_CLASS(wxLuaDebuggerEvent)
00416 };
00417 
00418 typedef void (wxEvtHandler::*wxLuaDebuggerEventFunction)(wxLuaDebuggerEvent&);
00419 
00420 BEGIN_DECLARE_EVENT_TYPES()
00421     // The debuggee has connected to the debugger through the socket connection
00422     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_DEBUGGEE_CONNECTED,    2510)
00423     // The debuggee has disconnected to the debugger through the socket connection
00424     //  check Has/GetMessage for a description why
00425     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED, 2510)
00426     // The debuggee has sent a wxLUASOCKET_DEBUGGEE_EVENT_BREAK
00427     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_BREAK,                 2511)
00428     // The debuggee has sent a wxLUASOCKET_DEBUGGEE_EVENT_PRINT
00429     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_PRINT,                 2512)
00430     // The debuggee has sent a wxEVT_WXLUA_DEBUGGER_ERROR
00431     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_ERROR,                 2513)
00432     // The debuggee has sent a wxEVT_WXLUA_DEBUGGER_EXIT
00433     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_EXIT,                  2514)
00434     // The debuggee has sent a wxLUASOCKET_DEBUGGEE_EVENT_STACK_ENUM
00435     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_STACK_ENUM,            2515)
00436     // The debuggee has sent a wxLUASOCKET_DEBUGGEE_EVENT_STACK_ENTRY_ENUM
00437     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_STACK_ENTRY_ENUM,      2516)
00438     // The debuggee has sent a wxLUASOCKET_DEBUGGEE_EVENT_TABLE_ENUM
00439     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_TABLE_ENUM,            2517)
00440     // The debuggee has sent a wxLUASOCKET_DEBUGGEE_EVENT_EVALUATE_EXPR
00441     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_EVALUATE_EXPR,         2518)
00442 
00443     //DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_STARTDEBUGGER,         2519)
00444     //DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUASOCKET, wxEVT_WXLUA_DEBUGGER_STOPDEBUGGER,          2520)
00445 END_DECLARE_EVENT_TYPES()
00446 
00447 #define wxLuaDebuggerEventHandler(func) \
00448     (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxLuaDebuggerEventFunction, &func)
00449 
00450 #define EVT_WXLUA_DEBUGGER_DEBUGGEE_CONNECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_CONNECTED,  id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00451 #define EVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED,  id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00452 #define EVT_WXLUA_DEBUGGER_BREAK(id, fn)              DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_BREAK,               id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00453 #define EVT_WXLUA_DEBUGGER_PRINT(id, fn)              DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_PRINT,               id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00454 #define EVT_WXLUA_DEBUGGER_ERROR(id, fn)              DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_ERROR,               id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00455 #define EVT_WXLUA_DEBUGGER_EXIT(id, fn)               DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_EXIT,                id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00456 #define EVT_WXLUA_DEBUGGER_STACK_ENUM(id, fn)         DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_STACK_ENUM,          id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00457 #define EVT_WXLUA_DEBUGGER_STACK_ENTRY_ENUM(id, fn)   DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_STACK_ENTRY_ENUM,    id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00458 #define EVT_WXLUA_DEBUGGER_TABLE_ENUM(id, fn)         DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_TABLE_ENUM,          id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00459 #define EVT_WXLUA_DEBUGGER_EVALUATE_EXPR(id, fn)      DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_EVALUATE_EXPR,       id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00460 //#define EVT_WXLUA_DEBUGGER_STARTDEBUGGER(id, fn)      DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_STARTDEBUGGER,       id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00461 //#define EVT_WXLUA_DEBUGGER_STOPDEBUGGER(id, fn)       DECLARE_EVENT_TABLE_ENTRY(wxEVT_WXLUA_DEBUGGER_STOPDEBUGGER,        id, -1, wxLuaDebuggerEventHandler(fn), (wxObject *) NULL),
00462 
00463 #endif // WX_LUA_DEBUG_SERVER_H
Generated on Tue Jul 13 10:30:39 2010 for wxLua by  doxygen 1.6.3