views:

41

answers:

2

I know it is possible to remotely debug code using gdb's server mode and I know it is possible to debug code that has been cross-compiled for another architecture, but is it possible to go a step further and remotely debug Linux applications from OS X using gdbserver?

+1  A: 

Certainly, but you need a cross-compiled GDB, compiled for OSX-host and Linux-target. This is not at all uncommon; there should be plenty of GDB documentation to cover this.

JesperE
I assume that I need to use something like cross-tool for this then? It would be really nice to be able to plug this into the graphical debugger that comes with XCode: not sure if that is possible as I know that it uses a modified version of GDB.
jkp
I don't know anything about XCode, unfortunately. With any luck, XCode allows you to specify which GDB you are using. You may also want to check if XCode has any special requirements on the GDB it uses (special patches, versions, etc.).
JesperE
A: 

It is possible from Windows with Cygwin. I don't know about OS X.

SF.