Extracting Debug Information from binary (ELF/DWARF?) file. (CodeWarrior for Coldfire Version 6.4)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extracting Debug Information from binary (ELF/DWARF?) file. (CodeWarrior for Coldfire Version 6.4)

4,966 Views
Rufus_Work
Contributor I

I am trying to extract the debug symbol information from the binary output file of the compiler.

 

(Specifically I want to get Structure Field names and Offsets for certain structures in my program)

 

This information looks like it is in the .debug section of the ELF file output.

 

But I can't seem to get the "standard" programs from the internet:  readelf, objdump to dump the fields.  I think

they may be using a different format of the DWARF specification.

 

Are there any utilities that can dump the debug information?  Or shall I continue rolling my own?

 

Thanks,

 

Rufus

Labels (1)
0 Kudos
Reply
3 Replies

2,917 Views
ipa
Contributor III

Hi,

Maybe you already know this :

a) In CW go to Project | Add Files and add the projname.elf to your project (will appear in *.mcp window);

b) Right click on projname.elf and select "Disassembly"

CW will create a window "projname.elf.dump" with all locations and symbols. Save it for further processing.

Hope this will help you.

Regards,

ipa 

0 Kudos
Reply

2,917 Views
Rufus_Work
Contributor I

I don't see a projname.elf file any where in my project directories.

Could the person who configured the  project have left the extension off the file?

There are multiple targets as well.  Won't each have a different elf file?

0 Kudos
Reply

2,917 Views
Rufus_Work
Contributor I

I'm in the process of "Rolling my own" because it appears that most debuggers are using DWARF Version 2  or Version 3 and the CodeWarrior tools output DWARF Version 1 to the ELF file

 

Here's the dwarf standards page:  www.dwarfstd.org

 

It was a comment in version 2 that explained changes from version 1 that made it obvious that my elf files were version 1.

Version 1 has only one ".debug" section, and it is split up into multiple sections in later versions.

 

 

I'll post on progress....

 

Rufus

0 Kudos
Reply