SLAA534A June 2013 – June 2020
The DWARF standard allows toolchain vendors to define additional tags and attributes for representing information that is specific to an architecture or toolchain. TI has defined some of each. This section serves to document the ones that apply generally to the MSP430 architecture.
Unfortunately, the set of allowable values is shared among all vendors, so the ABI cannot mandate standard values to be used across vendors. The best we can do is ask producers to define their own vendor-specific tags and attributes with the same semantics (using the same values if possible), and ask consumers to use the DW_AT_producer attribute in order to interpret vendor-specific values that differ from toolchain to toolchain.
Table 10-2 defines TI vendor-specific DIE tags for the MSP430. Table 10-2 defines TI vendor-specific attributes.
Name | Value | Description |
---|---|---|
DW_TAG_TI_branch | 0x4088 | Identifies calls and returns |
DW_TAG_TI_branch
This tag identifies branches that are used as calls and returns. It is generated as a child of a DW_TAG_subprogram DIE. It has a DW_AT_lowpc attribute corresponding to the location of the branch instruction.
If the branch is a function call, it has a DW_AT_TI_call attribute with non-zero value. It may also have a DW_AT_name attribute that indicates the name of the called function, or a DW_AT_TI_indirect attribute if the callee is not known (as with a call through a pointer).
If the branch is a return, it has a DW_AT_TI_return attribute with non-zero value.
Name | Value | Class | Description |
---|---|---|---|
DW_AT_TI_symbol_name | 0x2001 | string | Object file name (mangled) |
DW_AT_TI_return | 0x2009 | flag | Branch is a return |
DW_AT_TI_call | 0x200A | flag | Branch is a call |
DW_AT_TI_asm | 0x200C | flag | Function is assembly language |
DW_AT_TI_indirect | 0x200D | flag | Branch is an indirect call |
DW_AT_TI_max_frame_size | 0x2014 | constant | Activation record size |
DW_AT_TI_call, DW_AT_TI_return, DW_AT_TI_indirect: These attributes apply to DW_TAG_TI_branch DIEs, as described previously.
DW_AT_TI_symbol_name: This attribute can appear in any DIE that has a DW_symbol_name. It provides the object-file-level name associated with the variable or function; that is, with any mangling or other alteration applied by the toolchain to the source-level name.
DW_AT_TI_max_frame_size: This attribute may appear in a DW_TAG_subprogram DIE. It indicates the amount of stack space required for an activation of the function, in bytes. Its intended use is for downstream tools that perform static stack depth analysis.