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.

C2000 6.2 and 6.4 compiler - COFF/DWARF info

Hi,

I'm currently working on a C2000 platform using the 6.2.11 compiler. I've been using the DWARF (-g) debug option for a while and everything was fine. I looked at the debug info in the OUT file and I can't find which dwarf version is being used. On another project, using ARM based TMS570, I can choose the dwarf version, be it 3 or 2. Is it possible to know which Dwarf version is used with the C2000 -g option?

Also, is there a difference in the generated dwarf from the ARM compiler and the C2000 compiler? 

Last of all, I saw in the roadmap that ELF will be supported this summer in the next code generation tools for C2000. Will that bring the latest dwarf version? Will it the debug info generated with the C2000 compiler be the same as the ones from the ARM compiler?

Thanks in advance for your help.

Best regards,

  • C2000 compiler version 6.2.11 uses DWARF version 2 by default. You cannot select version 3.
    C2000 compiler version 6.4.0 uses DWARF version 3 by default. You can select version 2 if you want.

  • You can use "ofd2000 -g" to dump the DWARF debugging information. Look at the version of the .debug_info section; that is the DWARF version. If you're looking at a linked executable, there can be many .debug_info sections with different versions, so make sure you look at a freshly-built relocatable object file.

    The ARM and C2000 DWARF information is of course different because they have different registers, and use different stack allocation schemes. There are also some TI extensions which may or may not be present in one or the other target. However, the DWARF information is generated by the same body of code, so contemporary compilers will produce very similar DWARF information.

    We do not support STABS/COFF debugging with EABI/ELF, so C2000 EABI/ELF will use DWARF. Our policy is to default to DWARF version 3 minimum for EABI, so in that respect the DWARF version will not change for C2000 EABI/ELF.
  • Hi,

    That answers pretty much all I wanted. Thank you very much. I had lots of problem compiling with 6.4.2 so I didn't try much to fix the compile errors. It was kind of weird too. Errors were not reported in the error window. I had to check the console to see them. Anyway, since I want Dwarf 3, I'll find a way to make it work. If not, I'll post something about it.

    Regards,