Continuing at a Different Address

Ordinarily, when you continue your program, you do so at the place where it stopped. You can instead continue at an address of your own choosing.

The most common occasion to use this feature is to back up--perhaps with more breakpoints set-over a portion of a program that has already executed, in order to examine its execution in more detail.

To set the execution position to the current location, use Set Execution Position from the breakpoint popup menu. This item is also accessible by pressing and holding the Break/Clear button.23

As a quicker alternative, you can also press mouse button 1 on the arrow and drag it to a different location.24

PICS/ddd-drag.jpg

Moving the execution position does not change the current stack frame, or the stack pointer, or the contents of any memory location or any register other than the program counter.

Some inferior debuggers (notably GDB) allow you to set the new execution position into a different function from the one currently executing. This may lead to bizarre results if the two functions expect different patterns of arguments or of local variables. For this reason, moving the execution position requests confirmation if the specified line is not in the function currently executing.

After moving the execution position, click on Continue to resume execution.

Node:Stack, Next:Undoing Program Execution, Previous:Continuing Somewhere Else, Up:Running

results matching ""

    No results matching ""