6.9 Examining Threads
In some operating systems, a single program may have more than one
_thread_ of execution. The precise semantics of threads differ from
one operating system to another, but in general the threads of a single
program are akin to multiple processes--except that they share one
address space (that is, they can all examine and modify the same
variables). On the other hand, each thread has its own registers and
execution stack, and perhaps private memory.
For debugging purposes, DDD lets you display the list of threads
currently active in your program and lets you select the _current
thread_--the thread which is the focus of debugging. DDD shows all
program information from the perspective of the current thread.(1)
To view all currently active threads in your program, select `Status
=> Threads'. The current thread is highlighted. Select any thread to
make it the current thread.
Using JDB, additional functionality is available:
* Select a _thread group_ to switch between viewing all threads and
the threads of the selected thread group;
* Click on `Suspend' to suspend execution of the selected threads;
* Click on `Resume' to resume execution of the selected threads.
For more information on threads, see the JDB and GDB documentation
(Note: Debugging programs with multiple threads.).
---------- Footnotes ----------
(1) Currently, threads are supported in GDB and JDB only.
automatically generated by info2www version 18.104.22.168