Debugging a multithreaded process
The z/TPF debugger supports the debugging of a multithreaded process (also known as a multithreaded application) in a single session.
When an initial stop condition is detected for a threaded process, the z/TPF debugger reports the threads that are in the same process to the z/TPF debugger client and requests that each thread in the process is stopped. If a thread cannot be stopped, it is reported as running. A thread that is running is not available for debugging. For example, set breakpoints, view expressions, or implement other kinds of thread functionality by using the z/TPF debugger.
You can view the ECB trace of a thread that is running by using the ECBTRACE command. However, the accuracy of the data is reliable only at the time that it is collected by the z/TPF debugger. To ensure that the data continues to be accurate, you must enter the ECBTRACE command again.
You can view the memory contents of a thread that is running by specifying the absolute memory address in the memory view of the z/TPF debugger.
The z/TPF debugger can concurrently debug multiple threads. For example, if threads A and B are contained in a process and are stopped, you can set a breakpoint in thread A and resume running the thread. While thread A is running to the specified breakpoint, you can specify the step into function on thread B and view the change in local variables.
If the pthread_create function is issued from a thread inside a z/TPF debugger session, the z/TPF debugger stops the created thread and alerts the z/TPF debugger client about the created thread. The z/TPF debugger reports the created thread as stopped. The creating thread continues to run until a stop condition occurs.
For more information about the pthread_create function, see z/TPF supported thread functions.