GDB: Wrong version in compilation unit header (is 4, should be 2)

I’m trying to compile an SDL2 application on 64 bit Haiku (latest nightly), and I was trying to gather some more information before I bother the devs and raise a ticket.

I ran the freshly compiled and linked binary through GDB and every component (including those in the SDL2-devel package I downloaded through pkgman) resulted in errors such as this:

Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /boot/system/lib/libSDL2_ttf-2.0.so.0.14.1]

Anybody seen this or know how to fix it?

GDB is not functional at the moment unfortunately (it has not been updated for quite some time, and we probably should have removed it from HaikuDepot a while back). Haiku’s native “Debugger” is the primary way to debug an application on Haiku. Here’s the main documentation for Haiku’s Debugger: https://www.haiku-os.org/docs/userguide/en/applications/debugger.html

If you have any other questions about Debugger, please ask! :slight_smile:

1 Like

Please don’t remove it from haikudepot, while it does not support native debugging it is useful for remote debugging still (for example through jtag for ARM hardware, or through qemu gdb stub).

1 Like

I second this, GDB is still useful for debugging other languages not currently supported by Haiku’s Debugger app.

We should look into either fixing GDB or supporting more languages being debugged via the Debugger app.

1 Like