HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)

-g, -g1 Algorithm
In general, the compiler looks for the first non-inline, non-pure (non-zero) virtual function
in order to emit debug information for a class.If there are no virtual member functions,
the compiler looks for the first non-inline member function.
If there are no non-inline member functions, debug information is always generated.
A problem occurs if all functions are inline; in this case, no debug information is
generated.
+macro_debug
This option controls the emission of macro debug information into the object file.
Set +macro_debug to one of the following required options:
ref Emits debug information only for referenced macros. This is the default for -g,
-g1, or -g0.
all Emits debug information for all macros. This option can cause a significant
increase in object file size.
none Does not emit any macro debug information.
One of the -g options (-g, -g0, or -g1) must be used to enable the +macro_debug
option.
+[no]objdebug
The +objdebug option generates debug information in object files and not in the
executable. The HP WDB debugger then reads the object files to construct debugging
information; they must be present when debugging.
The +noobjdebug option generates debug information in object files which the linker
places into the executable. The HP WDB debugger then reads the executable to construct
debugging information.
NOTE: With +objdebug, the object files or archive libraries must not be removed.
+objdebug is the default at link time and at compile time. If +noobjdebug is used at
link time, all debug information goes into the executable, even if some objects were
compiled with +objdebug.
If +objdebug is used at compile time, extra debug information is placed into each
object file to help the debugger locate the object file and to quickly find global types
and constants.
Usage:
Use +objdebug option to enable faster links and smaller executable file sizes for large
applications, rather than +noobjdebug where debug information is written to the
executable.
Use +noobjdebug with the -g, -g0, or -g1 option when using +ild.
Debugging Options 41