All Debuggers (GNU Compiler Collection (GCC) Internals)

#### 19.23.1 Macros Affecting All Debugging Formats ¶

These macros affect all debugging formats.

Macro: DEBUGGER_REGNO (regno) ¶

  A C expression that returns the debugger register number for the compiler register number regno. In the default macro provided, the value of this expression will be regno itself. But sometimes there are some registers that the compiler knows about and debugger does not, or vice versa. In such cases, some register may need to have one number in the compiler and another for debugger.

  If two registers have consecutive numbers inside GCC, and they can be used as a pair to hold a multiword value, then they must have consecutive numbers after renumbering with `DEBUGGER_REGNO`. Otherwise, debuggers will be unable to access such a pair, because they expect register pairs to be consecutive in their own numbering scheme.

  If you find yourself defining `DEBUGGER_REGNO` in way that does not preserve register pairs, then what you must do instead is redefine the actual register numbering scheme.

Macro: DEBUGGER_AUTO_OFFSET (x) ¶

  A C expression that returns the integer offset value for an automatic variable having address x (an RTL expression). The default computation assumes that x is based on the frame-pointer and gives the offset from the frame-pointer. This is required for targets that produce debugging output for debugger and allow the frame-pointer to be eliminated when the `-g` option is used.

Macro: DEBUGGER_ARG_OFFSET (offset, x) ¶

  A C expression that returns the integer offset value for an argument having address x (an RTL expression). The nominal offset is offset.

Macro: PREFERRED_DEBUGGING_TYPE ¶

  A C expression that returns the type of debugging output GCC should produce when the user specifies just `-g`. Define this if you have arranged for GCC to support more than one format of debugging output. Currently, the allowable values are `DWARF2_DEBUG`, `VMS_DEBUG`, and `VMS_AND_DWARF2_DEBUG`.

  When the user specifies `-ggdb`, GCC normally also uses the value of this macro to select the debugging output format, but with two exceptions. If `DWARF2_DEBUGGING_INFO` is defined, GCC uses the value `DWARF2_DEBUG`.

  The value of this macro only affects the default debugging output; the user can always get a specific type of output by using `-gdwarf-2`, or `-gvms`.

Macro: DEFAULT_GDB_EXTENSIONS ¶

  Define this macro to control whether GCC should by default generate GDB’s extended version of debugging information. If you don’t define the macro, the default is 1: always generate the extended information if there is any occasion to.