Advancing Program Execution
Debugging begins by entering a dload or dattach command. If you use the dload command, you must use the drun command (or perhaps drerun if there’s a starter program) to start the program executing. These three commands work at the process level and you can’t use them to start individual threads. This is also true for the dkill command.
To advance program execution, you enter a command that causes one or more threads to execute instructions. The commands are applied to a P/T set. (See “Compressed List Syntax” .) Because the set doesn’t have to include all processes and threads, you can cause some processes to be executed while holding others back. You can also advance program execution by increments, stepping the program forward, and you can define the size of the increment. For example, dnext 3 executes the next three statements, and then pauses what you’ve been stepping.
Typically, debugging a program means that you have the program run, and then you stop it and examine its state. In this sense, a debugger can be thought of as a tool that lets you alter a program’s state in a controlled way, and debugging is the process of stopping a process to examine its state. However, the term stop has a slightly different meaning in a multi-process, multi-threaded program. In these programs, stopping means that the CLI holds one or more threads at a location until you enter a command to start executing again. Other threads, however, may continue executing.