Debugging with GDB (September 2007)
Chapter 14: HP-UX Configuration-Specific Information 121
Fix and Continue is only supported with the most recent versions of HP C
and HP aC++ on PA-RISC systems.
In command-line mode, you use the edit command before invoking the fix command.
The edit command has the following syntax:
edit file1 file2
where file
represents one or more source files for the current executable. If you do not specify a
file name, WDB edits the currently op e n source file.
When you e dit a file with the edit command and save the changes, the original source
file contains the changes, even if you do not use the fix command to recompile the program
in the debugger.
14.7.1 Fix and Continue compiler dependencies
Fix and Continue is supported only for PA-RISC on HP-UX 11.x with these compilers:
• HP C/ANSI C A.11.01.20, or later
• HP aC++ A.03.25, or later
• HP Fortran 90 2.4, or later
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 fix a routine in a file that c ontains 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 file. Breakpoints in
the already instantiated functions on the call stack in the original file are lost.