This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
OS X cross-debugging from Linux?
- From: "Michael D. Crawford" <crawford at goingware dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 23 May 2002 19:36:03 -0500
- Subject: OS X cross-debugging from Linux?
Greetings, I have just joined the list.
I want to develop a Mac OS X device driver. One can debug the OS X kernel using
GDB as a cross-debugger between two machines over ethernet. Apple has a page
that describes how to do it here:
http://www.opensource.apple.com/projects/documentation/howto/html/KEXT_Tutorials/HelloDebugger.html
However, this assumes both machines are running OS X and using the version of
GDB that Apple provides.
I'm going to be away visiting relatives for about a month and it wouldn't be
convenient for me to take my desktop Mac. I have an x86 laptop that runs Linux.
Could I have GDB run on my linux laptop and debug OS X running on an iBook?
I asked about this on the darwin-drivers mailing list and someone thought that
it would be possible, but I would need to make a special build of GDB because
the main GDB distribution hasn't picked up all of Apple's customizations.
Apparently there is a special protocol as well as support for the mach-o binary
format that needs to be enabled.
I assume I can get the source to Apple's GDB from its website, but maybe there
are issues with getting it to work on Linux. For example, it may care about the
byte order (Macs run big-endian PowerPC processors) or about the API used to
talk over the network (OS X has Berkeley sockets but I don't know if there's
anything weird about them).
Any help is appreciated.
My x86 laptop runs Slackware 8.
If I can get this to work I will write up a HOWTO and post it on the web.
Thanks,
Michael D. Crawford
GoingWare Inc. - Expert Software Development and Consulting
http://www.goingware.com/
crawford@goingware.com
Subscribe to the GoingWare Newsletter at http://www.goingware.com/newsletter/
Tilting at Windmills for a Better Tomorrow.