문제

all, is there a tool to check DWARF version of file? Something like this:

$ dwarf_tool binary_name
4
도움이 되었습니까?

해결책

In Linux environment? If you have GCC installed, you should have readelf executable. So you can try this

readelf --debug-dump=info binary_name | grep -A 2 'Compilation Unit @'

다른 팁

You could also use "llvm-dwarfdump" tool as below

llvm-dwarfdump --debug-dump=info hello | grep 'Compile Unit:'
0x00000000: Compile Unit: length = 0x00000075 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000079)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top