Check DWARF version of compilation unit
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 -r 1 binary_name | head | grep Compile
Sample output
0x00000000: Compile Unit: length = 0x0004710b, format = DWARF32, version = 0x0004, abbr_offset = 0x0000, addr_size = 0x08 (next unit at 0x0004710f)