wxLuaDebugTarget Class Reference

#include <wxldtarg.h>

Collaboration diagram for wxLuaDebugTarget:
[legend]

List of all members.

Classes

class  LuaThread

Public Member Functions

 wxLuaDebugTarget (const wxLuaState &wxlState, const wxString &serverName, int portNumber)
virtual ~wxLuaDebugTarget ()
bool Run ()
void Stop ()
void ThreadFunction ()
bool HandleDebuggerCmd (int cmd)
void DisplayError (const wxString &errorMsg)

Protected Types

enum  debugOperations { DEBUG_STEP, DEBUG_STEPOVER, DEBUG_STEPOUT, DEBUG_GO }

Protected Member Functions

void EnterLuaCriticalSection ()
void LeaveLuaCriticalSection ()
void ExitThread ()
wxString CreateBreakPoint (const wxString &fileName, int lineNumber) const
bool AtBreakPoint (const wxString &fileName, int lineNumber) const
bool AddBreakPoint (const wxString &fileName, int lineNumber)
bool RemoveBreakPoint (const wxString &fileName, int lineNumber)
bool ClearAllBreakPoints ()
bool Run (const wxString &fileName, const wxString &buffer)
bool Step ()
bool StepOver ()
bool StepOut ()
bool Continue ()
bool Break ()
bool Reset ()
bool EnumerateStack ()
bool EnumerateStackEntry (int stackRef)
bool EnumerateTable (int tableRef, int nIndex, long itemNode)
bool EvaluateExpr (int exprRef, const wxString &strExpr)
bool NotifyBreak (const wxString &fileName, int lineNumber)
bool NotifyPrint (const wxString &errorMsg)
bool NotifyError (const wxString &errorMsg)
bool NotifyExit ()
bool NotifyStackEnumeration (const wxLuaDebugData &debugData)
bool NotifyStackEntryEnumeration (int stackRef, const wxLuaDebugData &debugData)
bool NotifyTableEnumeration (long itemNode, const wxLuaDebugData &debugData)
bool NotifyEvaluateExpr (int exprRef, const wxString &strResult)
bool DebugHook (int event)
bool IsConnected (bool wait_for_connect=true) const

Static Protected Member Functions

static wxLuaDebugTargetGetDebugTarget (lua_State *L)
static void LUACALL LuaDebugHook (lua_State *L, lua_Debug *debug)
static int LUACALL LuaPrint (lua_State *L)

Protected Attributes

wxLuaState m_wxlState
int m_port_number
wxString m_serverName
wxSortedArrayString m_breakPointList
wxMutex m_debugMutex
wxCondition m_debugCondition
wxLuaSocket m_clientSocket
debugOperations m_nextOperation
bool m_forceBreak
bool m_resetRequested
bool m_fConnected
bool m_fRunning
bool m_fStopped
bool m_fExiting
bool m_fErrorsSeen
int m_nFramesUntilBreak
wxMutex m_runMutex
wxCondition m_runCondition
wxArrayString m_bufferArray
LuaThreadm_pThread
wxArrayInt m_references
wxCriticalSection m_luaCriticalSection
wxCriticalSection m_breakPointListCriticalSection

Detailed Description

Definition at line 24 of file wxldtarg.h.


Member Enumeration Documentation

Enumerator:
DEBUG_STEP 
DEBUG_STEPOVER 
DEBUG_STEPOUT 
DEBUG_GO 

Definition at line 56 of file wxldtarg.h.


Constructor & Destructor Documentation

wxLuaDebugTarget::wxLuaDebugTarget ( const wxLuaState wxlState,
const wxString &  serverName,
int  portNumber 
)
wxLuaDebugTarget::~wxLuaDebugTarget (  )  [virtual]

Definition at line 79 of file wxldtarg.cpp.

References LeaveLuaCriticalSection().


Member Function Documentation

bool wxLuaDebugTarget::AddBreakPoint ( const wxString &  fileName,
int  lineNumber 
) [protected]

Definition at line 353 of file wxldtarg.cpp.

References CreateBreakPoint(), m_breakPointList, and m_breakPointListCriticalSection.

Referenced by HandleDebuggerCmd().

bool wxLuaDebugTarget::AtBreakPoint ( const wxString &  fileName,
int  lineNumber 
) const [protected]

Definition at line 347 of file wxldtarg.cpp.

References CreateBreakPoint(), m_breakPointList, and m_breakPointListCriticalSection.

Referenced by DebugHook().

bool wxLuaDebugTarget::Break (  )  [protected]

Definition at line 430 of file wxldtarg.cpp.

References m_forceBreak.

Referenced by HandleDebuggerCmd().

bool wxLuaDebugTarget::ClearAllBreakPoints (  )  [protected]

Definition at line 367 of file wxldtarg.cpp.

References m_breakPointList, and m_breakPointListCriticalSection.

Referenced by HandleDebuggerCmd().

bool wxLuaDebugTarget::Continue (  )  [protected]

Definition at line 418 of file wxldtarg.cpp.

References DEBUG_GO, m_debugCondition, m_fRunning, m_fStopped, m_nextOperation, and m_runCondition.

Referenced by HandleDebuggerCmd().

wxString wxLuaDebugTarget::CreateBreakPoint ( const wxString &  fileName,
int  lineNumber 
) const [protected]

Definition at line 342 of file wxldtarg.cpp.

Referenced by AddBreakPoint(), AtBreakPoint(), and RemoveBreakPoint().

bool wxLuaDebugTarget::DebugHook ( int  event  )  [protected]
void wxLuaDebugTarget::DisplayError ( const wxString &  errorMsg  ) 

Definition at line 52 of file wxldtarg.h.

void wxLuaDebugTarget::EnterLuaCriticalSection (  )  [protected]
bool wxLuaDebugTarget::EnumerateStack (  )  [protected]
bool wxLuaDebugTarget::EnumerateStackEntry ( int  stackRef  )  [protected]
bool wxLuaDebugTarget::EnumerateTable ( int  tableRef,
int  nIndex,
long  itemNode 
) [protected]
bool wxLuaDebugTarget::EvaluateExpr ( int  exprRef,
const wxString &  strExpr 
) [protected]
void wxLuaDebugTarget::ExitThread (  )  [protected]
wxLuaDebugTarget * wxLuaDebugTarget::GetDebugTarget ( lua_State *  L  )  [static, protected]

Definition at line 744 of file wxldtarg.cpp.

Referenced by LuaDebugHook(), and LuaPrint().

bool wxLuaDebugTarget::HandleDebuggerCmd ( int  cmd  ) 
bool wxLuaDebugTarget::IsConnected ( bool  wait_for_connect = true  )  const [protected]
void wxLuaDebugTarget::LeaveLuaCriticalSection (  )  [protected]
void LUACALL wxLuaDebugTarget::LuaDebugHook ( lua_State *  L,
lua_Debug *  debug 
) [static, protected]

Definition at line 760 of file wxldtarg.cpp.

References DebugHook(), and GetDebugTarget().

Referenced by wxLuaDebugTarget().

int LUACALL wxLuaDebugTarget::LuaPrint ( lua_State *  L  )  [static, protected]

Definition at line 768 of file wxldtarg.cpp.

References GetDebugTarget(), lua2wx(), and NotifyPrint().

Referenced by wxLuaDebugTarget().

bool wxLuaDebugTarget::NotifyBreak ( const wxString &  fileName,
int  lineNumber 
) [protected]
bool wxLuaDebugTarget::NotifyError ( const wxString &  errorMsg  )  [protected]
bool wxLuaDebugTarget::NotifyEvaluateExpr ( int  exprRef,
const wxString &  strResult 
) [protected]
bool wxLuaDebugTarget::NotifyExit (  )  [protected]

Definition at line 614 of file wxldtarg.cpp.

References IsConnected(), m_clientSocket, wxLuaSocketBase::WriteCmd(), and wxLUASOCKET_DEBUGGEE_EVENT_EXIT.

Referenced by Reset(), and Stop().

bool wxLuaDebugTarget::NotifyPrint ( const wxString &  errorMsg  )  [protected]
bool wxLuaDebugTarget::NotifyStackEntryEnumeration ( int  stackRef,
const wxLuaDebugData debugData 
) [protected]
bool wxLuaDebugTarget::NotifyStackEnumeration ( const wxLuaDebugData debugData  )  [protected]
bool wxLuaDebugTarget::NotifyTableEnumeration ( long  itemNode,
const wxLuaDebugData debugData 
) [protected]
bool wxLuaDebugTarget::RemoveBreakPoint ( const wxString &  fileName,
int  lineNumber 
) [protected]

Definition at line 360 of file wxldtarg.cpp.

References CreateBreakPoint(), m_breakPointList, and m_breakPointListCriticalSection.

Referenced by HandleDebuggerCmd().

bool wxLuaDebugTarget::Reset (  )  [protected]
bool wxLuaDebugTarget::Run ( const wxString &  fileName,
const wxString &  buffer 
) [protected]

Definition at line 374 of file wxldtarg.cpp.

References m_bufferArray.

bool wxLuaDebugTarget::Run (  ) 
bool wxLuaDebugTarget::Step (  )  [protected]

Definition at line 380 of file wxldtarg.cpp.

References DEBUG_STEP, m_debugCondition, m_fRunning, m_fStopped, m_nextOperation, and m_runCondition.

Referenced by HandleDebuggerCmd().

bool wxLuaDebugTarget::StepOut (  )  [protected]
bool wxLuaDebugTarget::StepOver (  )  [protected]
void wxLuaDebugTarget::Stop (  ) 
void wxLuaDebugTarget::ThreadFunction (  ) 

Member Data Documentation

wxSortedArrayString wxLuaDebugTarget::m_breakPointList [protected]

Definition at line 67 of file wxldtarg.h.

Referenced by AddBreakPoint(), AtBreakPoint(), ClearAllBreakPoints(), and RemoveBreakPoint().

wxCriticalSection wxLuaDebugTarget::m_breakPointListCriticalSection [mutable, protected]

Definition at line 86 of file wxldtarg.h.

Referenced by AddBreakPoint(), AtBreakPoint(), ClearAllBreakPoints(), and RemoveBreakPoint().

wxArrayString wxLuaDebugTarget::m_bufferArray [protected]

Definition at line 82 of file wxldtarg.h.

Referenced by Run().

wxCondition wxLuaDebugTarget::m_debugCondition [protected]

Definition at line 69 of file wxldtarg.h.

Referenced by Continue(), DebugHook(), Reset(), Step(), StepOut(), and StepOver().

wxMutex wxLuaDebugTarget::m_debugMutex [protected]

Definition at line 68 of file wxldtarg.h.

Definition at line 74 of file wxldtarg.h.

Referenced by IsConnected(), Stop(), and ThreadFunction().

Definition at line 78 of file wxldtarg.h.

Referenced by NotifyError(), and Run().

bool wxLuaDebugTarget::m_fExiting [protected]

Definition at line 77 of file wxldtarg.h.

Referenced by DebugHook(), and ThreadFunction().

Definition at line 72 of file wxldtarg.h.

Referenced by Break(), DebugHook(), HandleDebuggerCmd(), and Reset().

bool wxLuaDebugTarget::m_fRunning [protected]

Definition at line 75 of file wxldtarg.h.

Referenced by Continue(), Reset(), Run(), Step(), StepOut(), and StepOver().

bool wxLuaDebugTarget::m_fStopped [protected]

Definition at line 76 of file wxldtarg.h.

Referenced by Continue(), DebugHook(), Reset(), Step(), StepOut(), and StepOver().

wxCriticalSection wxLuaDebugTarget::m_luaCriticalSection [protected]

Definition at line 85 of file wxldtarg.h.

Definition at line 71 of file wxldtarg.h.

Referenced by Continue(), DebugHook(), Step(), StepOut(), and StepOver().

Definition at line 79 of file wxldtarg.h.

Referenced by DebugHook(), StepOut(), and StepOver().

Definition at line 65 of file wxldtarg.h.

Referenced by ThreadFunction().

Definition at line 83 of file wxldtarg.h.

Referenced by Run(), Stop(), and ThreadFunction().

wxArrayInt wxLuaDebugTarget::m_references [protected]

Definition at line 84 of file wxldtarg.h.

Referenced by EnumerateStackEntry(), EnumerateTable(), and HandleDebuggerCmd().

Definition at line 73 of file wxldtarg.h.

Referenced by DebugHook(), NotifyBreak(), Reset(), and ThreadFunction().

wxCondition wxLuaDebugTarget::m_runCondition [protected]

Definition at line 81 of file wxldtarg.h.

Referenced by Continue(), Reset(), Run(), Step(), StepOut(), and StepOver().

wxMutex wxLuaDebugTarget::m_runMutex [protected]

Definition at line 80 of file wxldtarg.h.

wxString wxLuaDebugTarget::m_serverName [protected]

Definition at line 66 of file wxldtarg.h.

Referenced by ThreadFunction().


The documentation for this class was generated from the following files:
Generated on Tue Jul 13 10:30:39 2010 for wxLua by  doxygen 1.6.3