Copyright ã1996 by NeXT Software, Inc.  All Rights Reserved.

;ChangingCodeWhileDebugging.rtfd;;¬  Next Section	;DebuggingAMultithreadedProgram.rtfd;;¬  Previous Section

Changingprogramexecutionwhiledebugging;¬Changing program execution while debugging

¬	Use gdb commands to simulate a solution to a bug before building. 

Once you find out what's wrong with your program, you might want to test that the solution you've come up with will work before you change the source code and rebuild. For example, what if you set a variable to a different value? Will that solve the problem? 

¬

Command	Description
¬

call function	Executes the function. You can also use this for Objective-C messages.
¬

jump linenum 	Resume execution at line number linenum.  Execution may stop immediately if there's a breakpoint there.

The jump command doesn't change the current stack frame, or the stack pointer, or the contents of any memory location or any register other than the program counter.  If linenum is in a different function from the one currently executing, the results may be wild if the two functions expect different patterns of arguments or of local variables.  For this reason, the jump command requests confirmation if the specified line isn't in the function currently executing.
¬

jump *address 	Resume execution at the instruction at address address.
¬

set var = exp	Perform an assignment . 
¬