Attach a window to a thread

When you are debugging an RTOS application, you might find it useful to open several Code windows and attach each of them to a thread. You can then monitor them all at the same time as you run through the application. If it is not practical to have one window per thread, you could attach the most important threads, and then view all the others in an unattached window (that is, not attached to a specific thread, but it could be attached to the current processor).

You can attach a window to a thread using either the Thread tab of the Process Control pane, or the Thread sub-menu of the Code window File menu, or using the Threads button image\threads.gif as follows:

1. Click image\thrdsdwn.gif on the Threads button image\threads.gif to display a list of threads in the image currently loaded on the target. The current thread is indicated by an asterisk (*).

image\lamp.gifIf there are too many threads to display in this list, select More… to open the Thread Selection dialog where you can perform the window attachment.

2. Select a thread in the list to attach it to the window. The attachment is indicated by a checkmark (image\tickopt.gif) against the item in the list and the Attach Window to a Thread option. The title bar of the window also indicates the attachment.

To unattach the window, uncheck Attach Window to a Thread

image\lamp.gifAny unattached windows, or windows attached only to the current processor, display the details for the current thread, and most operations in the unattached windows or on their command lines also apply to the current thread.

Windows attached to a specific thread display the details for that thread and most operations in the attached window or its command line also apply to that thread.

See Stepping.

If you want to open other code windows, and attach them to different threads, select the New Code Window option from the View menu, and attach each of the windows in turn.