Skip to content

Python script for extracting struct layouts from ELF files with DWARF debug info

License

Notifications You must be signed in to change notification settings

hornang/struct-dump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

struct-dump

struct-dump is a tool to extract C struct layout definitions from the debug info embedded in ELF files. It works in combination with GNU's objdump and is designed for embedded projects.

struct-dump works in combination with objdump in such way that objdump is first run to output the debug info to a file:

objdump --dwarf firmware.elf > objdump.txt

Then struct-dump.py is called:

struct-dump.py -s structs.json -o struct_dump.json objdump.txt

structs.json is a file containing a single JSON array denoting the structs of interest and may look like this:

["StructA", "StructB", "StructC"]

About

Python script for extracting struct layouts from ELF files with DWARF debug info

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages