| |||
| Home > Using the ARM Compiler > armcc command syntax > Generating debug information | |||
These options enable you to specify whether debug tables are generated for the current compilation. If debug tables are generated, these options also enable you to specify the format of the debug tables. See Pragmas for more information on controlling debug information.
Optimization criteria can limit the debug information generated by the compiler. See Defining optimization criteria for more information.
Compilation tools are restricted to the permitted endianness of the target microcontroller unit (MCU).
The following options specify how debug tables are generated:
-g --debugThis option switches on the generation of debug
tables for the current compilation. The compiler produces the same
code whether or not -g is used. The only difference
is the existence of debug tables. --debug is a synonym
for -g.
Using -g does not affect optimization settings.
These options are specified by -O (for more details,
see Multi-optimization options). By default,
using the -g option alone is equivalent to:
-g -dwarf2 --debug_macros
Do not rely on the implementation details of this default
behavior, because it might change in future releases. The compiler
issues a warning if you use the -g option without
an optimization option.
--no_debugThis option switches off the generation of debug tables for the current compilation. This is the default option.
--no_debug_macrosThis option, when used with -g,
switches off the generation of debug table entries for preprocessor
macro definitions. This can reduce the size of the debug image.
--debug_macrosThis option, when used with -g,
enables the generation of debug table entries for preprocessor macro
definitions. This is the default. If your debugger ignores preprocessor
entries, you can use --no_debug_macros to reduce
the size of the debug image.