Search code examples
debuggingmacosgdbosx-snow-leopard32bit-64bit

How can I debug (GDB) the 32-bit part of a 64-bit application?


I have an app that is 64- and 32-bit-compatible. If I open the app through gdb (exec-file app), it opens the 64-bit part of the app. How can I open the 32-bit part instead?

Is there an argument that I have missed?


Solution

  • Apparently it can be done by setting a parameter for gdb:

    gdb -arch i386