I'm compiling a library using g++, using following parameters:
g++ -gdwarf-2
-std=c++0x
-m32
-Dunix=1
-Dlinux=1
-D_JAVA=1
-DNDEBUG=1
-I...
Although I'm using specific DWARF version 2, the investigation of my core-file keeps on giving following error message:
Dwarf Error: wrong version in
compilation unit header
(is 4, should be 2)
Does anybody know what I can do?
I'm working with following versions:
It is not possible to update the platform.
For your information: meanwhile I've found this URL (http://www.delorie.com/gnu/docs/gdb/gdb_17.html), which explains that sometimes it might be a bad idea to mix debugging information with optimisation flags. As a result, I have removed the optimisation flag (although it was "-O0", and I have used "g++ -gdwarf-2 -g3" (as mentioned in the URL), but still no improvement.
Meanwhile I've solved the problem, by updating my GDB (and related) processes.