In This Book

 

Thread status is indicated with the lab els RUNNING , READY , BLOCKED , and

 

 

 

TERMINATED . Note that execution of TERMINATED threads has ended but the

 

thread itself has not yet been deleted.

 

The point where execution has stopped is indicated with the ->marker.

 

 

You can also use the list threads command to display a list similar to the

one in the Threads dialog box.

When you highlight one or more threads in the Threads dialog box, you can

select a button to request the following actions:

4

 

 

 

5

 

 

Remove the selected thread(s) from the list of threads that can

Disable

 

 

 

 

 

 

 

 

run when the program is resumed.

4

 

 

5

 

 

 

Add the selected thread(s) to the list of threads that can run

Enable

 

 

 

 

 

 

 

 

when the program is resumed.

4

 

5

 

 

 

Kill the selected thread(s).

Kill

4

 

 

5

 

Display the selected thread's call/return stack in a new

Stack Trace...

 

 

 

 

 

 

 

 

window.

 

 

 

 

 

 

 

 

To monitor the call/return stac k of each thread as it executes,

 

 

 

 

 

 

 

 

invoke the Stack View dialog box by selecting Show:Stack

 

 

 

 

 

 

 

 

from the menu bar.

 

 

 

5

Make the selected thread the current execution thread. This

4->Next to Run

 

 

 

 

 

 

 

 

thread will be the ￿rst to run when the program is resumed.

4

 

5

Change environment to the selected thread. This allows you to

Examine

 

 

 

 

 

 

 

 

examine the status of a thread without changing the current

 

 

 

 

 

 

 

 

Execution thread.

Setting Breakpoints on Threads

8

 

You can activate breakpoin ts on all threads, or on an y selected set of threads.

The Breakpoints Set/Change dialog box contains an area at the bottom which allows you select which threads the breakpoin t will be set on. Choose Break:Set to invoke the Breakpoin ts Set/Change dialog bo x.

Also, the breakpoint command has a -threadoption. See the online command reference for more information and examples.

Debugging in Special Situations 8-9