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

Table Of Contents
14.7 Fix and continue debugging
Fix and continue enables you to see the result of changes you make to a program you
are debugging without having to re-compile and re-link the entire program.
For example, you can edit a function and use the fix command, which automatically
re-compiles the code, links it into a shared library, and continues execution of the program,
without leaving the debugger.
With Fix and Continue, you can experiment with various ways of fixing problems until
you are satisfied with the correction, before you exit the debugger.
The advantages include:
You do not have to recompile and relink the entire program.
You do not have to reload the program into the debugger.
You can resume execution of the program from the x location.
You can speed up the development cycle.
NOTE: 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, HP WDB edits the currently open source file.
When you edit 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 Fix and continue debugging 139