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.

Compiler/TMS320F28377S: ofd2000 output DIE offset of type

Part Number: TMS320F28377S

Tool/software: TI C/C++ Compiler

Hi all

I'm using ofd2000.exe to get type information of variables. For this I do call ofd2000 like this:

 ofd2000.exe -g --dwarf_display=none,dinfo,types --obj_display=none -o output.ofd input.out

DWARF version 3 in all cases here.

Until CGT 16.9.x the output for the variable "MyStructureProcess" was something like this:

    0000ea80  57    DW_TAG_variable (.ebss)
    0000ea81           DW_AT_location       DW_OP_addr 0x0000d3b0
    0000ea87           DW_AT_name           MyStructureProcess
    0000ea95           DW_AT_type           .debug_info(125) + 0xf2cb
    0000ea99           DW_AT_TI_symbol_name _MyStructureProcess

and

    0000f2cb  20    DW_TAG_typedef
    0000f2cc           DW_AT_name     MY_STRUCTURE_PROCESS
    0000f2db           DW_AT_language DW_LANG_C
    0000f2dc           DW_AT_type     .debug_info(125) + 0xf16e

and

    0000f16e  14    DW_TAG_structure_type
    0000f16f           DW_AT_sibling   .debug_info(125) + 0xf2cb
    0000f173           DW_AT_name      MY_STRUCTURE_PROCESS
    0000f183           DW_AT_byte_size 16
    0000f184   8       DW_TAG_member
    0000f185              DW_AT_name                 ActiveDischargeEnabled
    0000f19c              DW_AT_accessibility        1

here listing of all members starts
...

When parsing the output I'm going from offset to offset and do find the typedef.

Since 18.1.x the output is:

    0000eee2  57    DW_TAG_variable (.ebss)
    0000eee3           DW_AT_location       DW_OP_addr 0x00d3b0
    0000eee9           DW_AT_name           MyStructureProcess
    0000eef7           DW_AT_type           .debug_info(125) + 0x63267 -> This offset does not exist in output file!
    0000eefb           DW_AT_TI_symbol_name _MyStructureProcess

the structure definition starts at 0xf5c6 but I don't know why. It looks like this

    0000f5c6  14    DW_TAG_structure_type
    0000f5c7           DW_AT_sibling   .debug_info(125) + 0x63267
    0000f5cb           DW_AT_name      MY_STRUCTURE_PROCESS
    0000f5db           DW_AT_byte_size 16
    0000f5dc   8       DW_TAG_member
    0000f5dd              DW_AT_name                 ActiveDischargeEnabled
    0000f5f4              DW_AT_accessibility        1

Is the output of ofd2000.exe of CGT 18.1.x as intended and correct?

To what does 0x63267 refer to?

Thank you for sharing your knowledge!

Best regards

Roger

  • Thank you for reporting this problem.  I can produce a similar result.  I filed CODEGEN-5231 in the SDOWP system to have this investigated.  You are welcome to follow it with the SDOWP link below in my signature.

    Roger44834 said:
    When parsing the output

    Instead of parsing the standard text output of ofd2000, consider getting the same information in XML format, and processing that.  Some example Perl scripts which process the XML format of ofd2000 can be found in the cg_xml package.

    Thanks and regards,

    -George

  • Thank you George for your reply. I will check the state of the CODEGEN-5231 before switching to XML output. I tried to work with XML output some years ago, but the resulting XML was way bigger than the text output, so I decided to work with the text output. Anyway, a deeper look into the existing perl scripts could be a good idea.
    Best regards
    Roger