Control how much debugging and observability information is emitted.
The term tagtype refers to tagged types: structs, unions, enums, and classes.
The following list contains the possible values for suboptions a. The prefix no% applied to a suboption disables that suboption. The default is -xdebuginfo=%none. Specifying -xdebuginfo without a suboption is forbidden.
No debugging information is generated. This is the default.
Emit line number and file information.
Emit location list info for parameters. Emit full type information for scalar values (for example, int, char *) and type names but not full definitions of tagtypes.
Emit location list information for lexically global and local variables, including file and function statics but excluding class statics and externs. Emit full type information for scalar values such as int and char * and type names but not full definitions of tagtypes.
Emit information for function and variable declarations, member functions, and static data members in class declarations.
Emit full type definitions of tagtypes referenced from param and variable datasets, as well as template definitions.
Emit macro information.
Emit DWARF codetags (also known as Stabs N_PATCH). This is information regarding bitfields, structure copy, and spills used by RTC and discover.
Generate information critical to hardware counter profiling. This information includes ldst_map, a mapping from ld/st instructions to the symbol table entry being referenced, and branch_target table of branch-target addresses used to verify that backtracking did not cross a branch-target. See -xhwcprof for more information.
These are macros which expand to combinations of -xdebuginfo and other options as follows:
-g = -g2 -gnone = -xdebuginfo=%none -xglobalize=no -xpatchpadding=fix -xkeep_unref=no%funcs,no%vars -g1 = -xdebuginfo=line,param,codetag -xglobalize=no -xpatchpadding=fix -xkeep_unref=no%funcs,no%vars -g2 = -xdebuginfo=line,param,decl,variable,tagtype,codetag -xglobalize=yes -xpatchpadding=fix -xkeep_unref=funcs,vars -g3 = -xdebuginfo=line,param,decl,variable,tagtype,codetag,macro -xglobalize=yes -xpatchpadding=fix -xkeep_unref=funcs,vars