Pergunta

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

$ dwarf_tool binary_name
4
Foi útil?

Solução

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 @'

Outras dicas

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)
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top