You cannot add an alloca() function to a frame that did not previously use alloca().

New structure fields can be added at the end of a structure object, not in the middle of a structure. New fields are only accessible by the modified files. Old structure fields remain intact; no swapping of them is permitted.

If the redefined function is in the call stack but not on the top of the call stack, the modified code will not be executed when the execution resumes.

The modified function will be executed when it is called next time, or a rerun.

Breakpoints in the original source file are moved to the modified fie. Breakpoints in the already instantiated functions on the call stack in the original file are lost.

If you change the name of a function and there was a breakpoint set to the old function, WDB does not move the breakpoint to the new function. The old breakpoint is still valid.

If the number of lines of the modified file is different from that of the original file, the placement of breakpoints may not be correct.

When the program resumes, the program counter is moved to the beginning of the same line in the modified function. The program counter may be at the wrong line.

14.7.3Using Fix and Continue

When WDB recompiles a fixed source file, it uses the same compiler and the same options that were used to create the original executable. If the compiler generates any syntax errors or it encounters any of the restrictions, WDB does not patch the changes into the executable image being debugged.

After you successfully recompile the changes, WDB uses the fixed version of the code when you use any of the execution commands such as step, run, or continue.

When you use the edit command, WDB then monitors any edited source files for additional changes. After you enter the initial fix command, WDB checks for additional saved changes to a source file each time you enter a program execution command. If a saved source file has been changed, WDB asks if you want to fix the changed source, allowing you to apply repeated fixes without explicitly entering the fix command.

The Fix and Continue facility enables you to make the following changes:

Change existing function definitions.

Disable, reenable, save, and delete redefinitions

Adding global and file static variables.

Add new structure fields to the end of a structure type object.

Set breakpoints in and single-step within redefined code.

14.7 Fix and continue debugging 147

Page 147
Image 147
HP gnu source-level debugger 5992-4701 manual Using Fix and Continue