4.11.4 Jumping to a Particular Location

At times, you may wish to force the system to jump to a particular location in your application during execution. For example, you may want to avoid executing code that you know has bugs, or you may want to repeatedly execute a particularly troublesome portion of your application.

To jump to a specific location in your application, do the following:

1.From the Options menu, choose Source. Select the Mix Source and Assembly radio button and the Show Machine Code check box.

2.In the Source window, view the line of source code to which you want to jump.

3.Examine the code offset of the first machine instruction for the assembled statement.

4.To change the IP register to this code offset, type the rip (Register IP) command in the command window, supplying the value in hexadecimal format.

CVW highlights the line to which you have jumped.

Caution:

Do not jump from one procedure to another. Jumping from one procedure to another disrupts the stack.

Assembled source code for a given statement may rely on memory values and registers set in previous instructions. If you cause execution to jump to a specific point in your application, values and registers may not be correctly set, particularly if optimization was not disabled during compiling.