Here is a way todo it using dwarf debugging info if you are using gnu compiler tools. Compile your project output file with -g option, this will generate debugging information in your program. Then run objdump to dump the debug info. This debugging information contains all the information about your program, filter the output for "DW_TAG_structure_type" and you will get only structure information.
Here is how I did it:
objdump -W kernel.debug.reloc > debug.info
grep -e "DW_TAG_structure_type" debug.info --after-context=5 --mmap > structs.txt
0 comments:
Post a Comment