In This Book

it alters the point of execution of the program. The debugger cannot ensure that the program state is valid following this transfer of control.

The selected thread is the only one operated on by a step command.

thread -disableprevents speci￿ed threads from running until they are enabled again using thread -enable .

thread -enableallows the speci￿ed thread to run when you issue a go command. By default, all threads are enabled; ordinarily you use thread -enableto reactivate a disabled thread.

thread -killmarks the speci￿ed thread for termination. The killed thread persists until the thread scheduler actually terminates it.

In addition, the intercept command can take the following arguments when you are debugging multi-threaded applications:

thread_create

Stops program execution when

a thread is created.

thread_exit

Stops program execution when a thread is

 

terminated.

 

thread_switch

Stops program execution when the context

 

changes from one thread to another.

Finally, some debugger commands allow you to specify a thread by using the -threadoption. Those commands are:

activate breakpoints breakpoint

delete breakpoints suspend breakpoints tb

For more information on the commands described in this section, see the online command reference.

8-12 Debugging in Special Situations