Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
14.7.2 Fix and Continue restrictions
Fix and Continue has the following restrictions and behaviors:
You cannot recompile code that has been optimized.
You cannot add, delete, or reorder the local variables and parameters in a function
currently active on the stack.
If you x a routine in a file that contains function pointers, those function pointers
become invalid and will likely cause the program to receive a SIGSEGV error if the
pointers are used.
You cannot change the type of a local variable, file static, global variable, or
parameter of a function.
You cannot add any function calls that increase the size of the parameter area.
You cannot change a local or file static or global variable to be a register variable,
and vice-versa.
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, HP 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.3 Using Fix and Continue
When HP 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, HP WDB does not patch the changes
into the executable image being debugged.
After you successfully recompile the changes, HP WDB uses the fixed version of the code
when you use any of the execution commands such as step, run, or continue.
140 HP-UX Configuration-Specific Information