Search code examples
macosgdbmacos-mojave

GDB Compatibility Issue on OSX Mojave


I was using gdb before Mojave update but now it is throwing errors:

(gdb) file a.out BFD: /Users/aliomerkeser/Desktop/a.out: unknown load command 0x32 BFD: /Users/aliomerkeser/Desktop/a.out: unknown load command 0x32 "/Users/aliomerkeser/Desktop/a.out": not in executable format: File format not recognized

Is that a compatibility issue or a configuration issue of mine?

I tried downgrading gdb and re-codesigning gdb.


Solution

  • Known bug with gdb on Mojave. Still not resolved. In the thread below there is a solution proposed which involves rebuilding gdb with some changes.

    gdb 8.2 can't recognized executable file on macOS Mojave 10.14

    Update: 8.2 has officially incorporated these changes, so doesnt have to be done manually.