TMS320C28x Assembly Language Tools v17.3.0.STS User's Guide
SPRU513M - REVISED MARCH 2017

Symbolic Debugging Directives

The assembler supports several directives that the TMS320C28x C/C++ compiler uses for symbolic debugging. These directives differ for the two debugging formats, DWARF and COFF.

These directives are not meant for use by assembly-language programmers. They require arguments that can be difficult to calculate manually, and their usage must conform to a predetermined agreement between the compiler, the assembler, and the debugger. This appendix documents these directives for informational purposes only.

DWARF Debugging Format

A subset of the DWARF symbolic debugging directives are always listed in the assembly language file that the compiler creates for program analysis purposes. To list the complete set used for full symbolic debug, invoke the compiler with the --symdebug:dwarf option, as shown below:

cl2000 --symdebug:dwarf --keep_asm input_file

The --keep_asm option instructs the compiler to retain the generated assembly file.

To disable the generation of all symbolic debug directives, invoke the compiler with the -symdebug:none option:

cl2000 --symdebug:none --keep_asm input_file

The DWARF debugging format consists of the following directives:

  • The .dwtag and .dwendtag directives define a Debug Information Entry (DIE) in the .debug_info section.
  • The .dwattr directive adds an attribute to an existing DIE.
  • The .dwpsn directive identifies the source position of a C/C++ statement.
  • The .dwcie and .dwendentry directives define a Common Information Entry (CIE) in the .debug_frame section.
  • The .dwfde and .dwendentry directives define a Frame Description Entry (FDE) in the .debug_frame section.
  • The .dwcfi directive defines a call frame instruction for a CIE or FDE.

COFF Debugging Format

COFF symbolic debug is obsolete. These directives are supported for backwards-compatibility only. The decision to switch to DWARF as the symbolic debug format was made to overcome many limitations of COFF symbolic debug, including the absence of C++ support.

The COFF debugging format consists of the following directives:

  • The .sym directive defines a global variable, a local variable, or a function. Several parameters allow you to associate various debugging information with the variable or function.
  • The .stag, .etag, and .utag directives define structures, enumerations, and unions, respectively. The .member directive specifies a member of a structure, enumeration, or union. The .eos directive ends a structure, enumeration, or union definition.
  • The .func and .endfunc directives specify the beginning and ending lines of a C/C++ function.
  • The .block and .endblock directives specify the bounds of C/C++ blocks.
  • The .file directive defines a symbol in the symbol table that identifies the current source filename.
  • The .line directive identifies the line number of a C/C++ source statement.

Debug Directive Syntax

Table A-1 is an alphabetical listing of the symbolic debugging directives. For information on the C/C++ compiler, refer to the TMS320C28x Optimizing C/C++ Compiler User's Guide.

Table A-1 Symbolic Debugging Directives

Label Directive Arguments
.block [beginning line number]
.dwattr DIE label,DIE attribute name(DIE attribute value)[,DIE attribute name(attribute value) [, ...]
.dwcfi call frame instruction opcode[,operand[,operand]]
CIE label .dwcie version, return address register
.dwendentry
.dwendtag
.dwfde CIE label
.dwpsn "filename", line number, column number
DIE label .dwtag DIE tag name,DIE attribute name(DIE attribute value)[,DIE attribute name(attribute value) [, ...]
.endblock [ending line number]
.endfunc [ending line number[,register mask[, frame size]]]
.eos
.etag name[, size]
.file "filename"
.func [beginning line number]
.line line number[, address]
.member name, value[, type, storage class, size, tag, dims]
.stag name[, size]
.sym name, value[, type, storage class, size, tag, dims]
.utag name[, size]
Back to Top

Submit Documentation Feedback

Copyright© 2017, Texas Instruments Incorporated. An IMPORTANT NOTICE for this document addresses availability, warranty, changes, use in safety-critical applications, intellectual property matters and other important disclaimers.