This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28375D: ofd2000 results - meaning of "code" under abbreviations table

Part Number: TMS320F28375D

Tool/software: Code Composer Studio

In the abbreviations table of the file generated by ofd2000 -g, one of the columns is named "code". What does it mean?

DWARF Abbreviations Tables in Section 132 (".debug_abbrev")

    --------------------------------------
    Abbreviations Table at Offset 0x0
    --------------------------------------

    offset   code child tag/attribute                 form            
    -------- ---- ----- -------------                 ----            
    0x0         1 yes   DW_TAG_array_type                             
    0x3                    DW_AT_sibling              DW_FORM_ref_addr
    0x5                    DW_AT_byte_size            DW_FORM_data2   
    0x7                    DW_AT_language             DW_FORM_data1   
    0x9                    DW_AT_type                 DW_FORM_ref_addr
    0xd         2 yes   DW_TAG_array_type                             
    0x10                   DW_AT_sibling              DW_FORM_ref_addr
    0x12                   DW_AT_byte_size            DW_FORM_data1   
    0x14                   DW_AT_language             DW_FORM_data1   
    0x16                   DW_AT_type                 DW_FORM_ref_addr
    0x1a        3 no    DW_TAG_formal_parameter                       
    0x1d                   DW_AT_location             DW_FORM_block1  
    0x1f                   DW_AT_name                 DW_FORM_string  
    0x21                   DW_AT_type                 DW_FORM_ref_addr
    0x23                   DW_AT_TI_symbol_name       DW_FORM_string  
    0x28        4 no    DW_TAG_formal_parameter                       
    0x2b                   DW_AT_type                 DW_FORM_ref_addr
    0x2f        5 yes   DW_TAG_lexical_block                          
    0x32                   DW_AT_sibling              DW_FORM_ref_addr
    0x34                   DW_AT_low_pc               DW_FORM_addr    
    0x36                   DW_AT_high_pc              DW_FORM_addr   

  • Hi Lenio,

    The "code" column corresponds to the "abbreviation code" referred to in 7.5.3 of the DWARF 4 standard, which can be referenced at http://dwarfstd.org/doc/DWARF4.pdf.  This value corresponds to the abbreviation code listed on a Debugging Information Entry in the debug_info section.  For example, in a simple program, the debug_info section may contain:

    ...
    000000d2 4 DW_TAG_unspecified_type 000000d3 DW_AT_name void 000000d8 2 DW_TAG_base_type 000000d9 DW_AT_name bool 000000de DW_AT_byte_size 1 000000df DW_AT_encoding DW_ATE_boolean 000000e0 2 DW_TAG_base_type 000000e1 DW_AT_name signed char 000000ed DW_AT_byte_size 1 000000ee DW_AT_encoding DW_ATE_signed_char 000000ef 2 DW_TAG_base_type 000000f0 DW_AT_name unsigned char 000000fe DW_AT_byte_size 1 000000ff DW_AT_encoding DW_ATE_unsigned_char
    ...

    And the debug_info section may contain:

        offset   code child tag/attribute              form
        -------- ---- ----- -------------              ----
        0x0         1 yes   DW_TAG_compile_unit
        0x3                    DW_AT_name              DW_FORM_string
        0x5                    DW_AT_stmt_list         DW_FORM_data4
        0x7                    DW_AT_language          DW_FORM_data1
        0x9                    DW_AT_comp_dir          DW_FORM_string
        0xb                    DW_AT_producer          DW_FORM_string
        0xd                    DW_AT_TI_version        DW_FORM_data1
        0x12        2 no    DW_TAG_base_type
        0x15                   DW_AT_name              DW_FORM_string
        0x17                   DW_AT_byte_size         DW_FORM_data1
        0x19                   DW_AT_encoding          DW_FORM_data1
        0x1d        3 yes   DW_TAG_subprogram
        0x20                   DW_AT_sibling           DW_FORM_ref_addr
        0x22                   DW_AT_name              DW_FORM_string
        0x24                   DW_AT_low_pc            DW_FORM_addr
        0x26                   DW_AT_high_pc           DW_FORM_addr
        0x28                   DW_AT_external          DW_FORM_flag
        0x2a                   DW_AT_type              DW_FORM_ref_addr
        0x2c                   DW_AT_TI_symbol_name    DW_FORM_string
        0x2f                   DW_AT_TI_begin_file     DW_FORM_string
        0x32                   DW_AT_TI_begin_line     DW_FORM_data1
        0x35                   DW_AT_TI_begin_column   DW_FORM_data1
        0x38                   DW_AT_TI_end_file       DW_FORM_string
        0x3b                   DW_AT_TI_end_line       DW_FORM_data1
        0x3e                   DW_AT_TI_end_column     DW_FORM_data1
        0x41                   DW_AT_TI_max_frame_size DW_FORM_sdata
        0x46        4 no    DW_TAG_unspecified_type
        0x49                   DW_AT_name              DW_FORM_string
    ...

    In this case, the abbrev code 4 is used once and the abbrev code 2 is used 3 times in this portion of the output.  The debug_abbrev section is providing the structure of the information and the debug_info section is providing the values.