| |||
| Home > RTOS Support > Associating threads with views > The current thread | |||
When working with a multithreaded application, the current thread is initially set to the thread that was running on the processor when it stopped. If you are working with an unattached Code window, this shows details about the current thread.
When the current thread changes, for example when you stop the target with a different thread active, the Cmd tab of the Output pane displays details of the new current thread. This includes the thread number in decimal and the thread name, if it is available.
Initially in RSD, the current thread is undefined and so RealView Debugger designates a thread at random to be the current thread. However, you can change the current thread using the Cycle Threads button, see Using the Cycle Threads button for details.
If you are working in an unattached Code window, the current thread defines the scope of many CLI commands. If you are working in an attached window, the scope of CLI commands is defined by the attached thread.
You can use CLI commands to work with threads, for example:
Print the value of the thread that was current when the processor stopped.
Change the current thread.
See RealView Developer Kit v2.2 Command Line Reference Guide for a full description of the THREAD command.