Module implementing the multithreaded version of the debug client.
_original_start_thread |
DebugClientThreads | Class implementing the client side of the debugger. |
_debugclient_start_new_thread | Module function used to allow for debugging of multiple threads. |
Class implementing the client side of the debugger.
This variant of the debugger implements a threaded debugger client by subclassing all relevant base classes.
debugClient |
None |
DebugClientThreads | Constructor |
attachThread | Public method to setup a thread for DebugClient to debug. |
eventLoop | Public method implementing our event loop. |
lockClient | Public method to acquire the lock for this client. |
setCurrentThread | Private method to set the current thread. |
set_quit | Private method to do a 'set quit' on all threads. |
threadTerminated | Public method called when a DebugThread has exited. |
unlockClient | Public method to release the lock for this client. |
None |
Constructor
Public method to setup a thread for DebugClient to debug.
If mainThread is non-zero, then we are attaching to the already started mainthread of the app and the rest of the args are ignored.
Public method implementing our event loop.
Public method to acquire the lock for this client.
Private method to set the current thread.
Private method to do a 'set quit' on all threads.
Public method called when a DebugThread has exited.
Public method to release the lock for this client.
Module function used to allow for debugging of multiple threads.
The way it works is that below, we reset _thread._start_new_thread to this function object. Thus, providing a hook for us to see when threads are started. From here we forward the request onto the DebugClient which will create a DebugThread object to allow tracing of the thread then start up the thread. These actions are always performed in order to allow dropping into debug mode.
See DebugClientThreads.attachThread and DebugThread.DebugThread in DebugThread.py