In This Book

Executing the Target Program

The debugger can execute the target program by stepping through one or more statements at a time.

The easiest method for stepping through a target program is to use one of the step or continue command buttons. They are located below the source ￿le display area.

The debugger commands go, step, and goto are useful when you want to implement more complicated stepping procedures. The less commonly used call command is particularly useful for executing user-created debugging routines or for testing new routines in your program.

In addition, you can invoke execution commands from the Execute menu or from a popup menu in the source ￿le display area. The popup menu appears when you click with the right mouse button.

The following sections give a brief description of the command buttons and the debugger commands.

Using Command Buttons

The following buttons are located below the source ￿le display area:

4

Step

5

 

 

Execute one statemen t, then stop. This is called single step

 

 

 

 

 

execution.

4

 

5

 

Execute a statement, treating any procedure call as a single

Step Over

 

 

 

 

 

statement. The procedure is called, but control does not return

 

 

 

 

 

to the debugger until the procedure returns. When the PC is

 

 

 

 

 

just before a procedure call, this has the e￿ect of \stepping

 

 

 

 

 

over" the call.

4

 

5

Execute until the current procedure completes and returns

Continue Out

 

 

 

 

 

to its caller, or un til a breakpoint (or another ev ent that

 

 

 

 

 

halts execution) is encoun tered. This is v ery useful when you

 

 

 

 

 

accidentally step into a procedure that y ou do not want to step

 

 

 

 

 

through, or when you interrupt your program in the middle

 

 

 

 

 

of nondebuggable code. Eac h 4

 

5 will cause your

 

 

 

 

 

Continue Out

 

 

 

 

 

program to \pop out" one pro cedure level.

2-14 Compiling, Loading, and Executing the Target Program