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

Table Of Contents
Compiling /dev/src/sum.c...
Linking...
Applying code changes to sum.c.
Fix succeeded.
The fix command creates a new executable that includes the changes you made
to the source file.
The debugger automatically uses the new executable and picks up the debugging
session where you stopped before using the edit command.
For example, you can continue stepping through the program and you will find the
new return total; statement in the source view. You can print the value of
total, and see that the result is 110.
10. When you finish with the debugging session, you can exit the debugger normally:
(gdb) q
The following modules in /dev/src/mysum have been fixed:
/dev/src/sum.c
Remember to remake the program.
The debugger message lists the source files that you have changed during the
debugging session.
NOTE: You must rebuild the program after you use the fix command because
the changes you make are temporarily patched into the executable image. The
changes are lost when you exit the debugger or you load a different executable.
14.8 Inline Support
HP WDB enables you to debug inline functions in applications compiled with -g option.
To enable inline debugging in HP 9000 systems, the applications must be compiled with
the +inline_debug option (introduced in the A.03.65 and later versions of the HP
aC++ compiler). In Integrity systems, the applications that are compiled with -g option
support inline debugging by default and require no additional options. Compiler versions
A.06.02 and later support the inline debugging feature in Integrity systems.
14.8.1 Inline Debugging in HP 9000 Systems
To debug inline functions in HP 9000 systems, complete the following steps:
1. Compile the source files with the +inline_debug option.
For example:
/opt/aCC/bin/aCC -g +inline_debug test.c
2. Inline debugging is enabled by default. To explicitly enable or disable inline de-
bugging, complete either of the following steps before loading the application to
the debugger:
14.8 Inline Support 143