[lldb-dev] Can I use lldb to debug Mac OSX remotely from linux machine

Jiang, Yunhong yunhong.jiang at intel.com
Wed Oct 23 11:12:27 PDT 2013


Greg, thanks for your kindly reply.

--jyh

> -----Original Message-----
> From: Greg Clayton [mailto:gclayton at apple.com]
> Sent: Wednesday, October 23, 2013 11:09 AM
> To: Jiang, Yunhong
> Cc: lldb-dev at cs.uiuc.edu
> Subject: Re: [lldb-dev] Can I use lldb to debug Mac OSX remotely from
> linux machine
> 
> And you will need to update the CMakelists.txt and any Makefile files to
> also build these for all builds.
> 
> On Oct 23, 2013, at 10:41 AM, Greg Clayton <gclayton at apple.com>
> wrote:
> 
> > It should be after doing a bit of work.
> >
> > The first thing is to make sure that all needed plug-ins are actually
> compiled into the linux version. Go to lldb.cpp and you will see code:
> >
> > #if defined (__APPLE__)
> > #include
> "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h"
> > #include
> "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h"
> > #include
> "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV
> 1.h"
> > #include
> "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV
> 2.h"
> > #include
> "Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMa
> chO.h"
> > #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
> > #include "Plugins/Process/MacOSX-Kernel/ProcessKDP.h"
> > #include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
> > #include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h"
> > #include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h"
> > #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
> > #endif
> >
> > Start by getting rid of this #define and building all of these plug-ins for all
> system (they should compile).
> >
> > Next modify lldb_private::Initialize () to also remove the "#if defined
> (__APPLE__)" so the static ::Initialize method is called for all plug-ins.
> >
> > Do the same for lldb_private::Terminate().
> >
> > That should be all you need to do! Then you should be able to do:
> >
> > % lldb
> > (lldb) platform select remote-macosx
> > (lldb) file ...
> > (lldb) kdp-remote mymac.bar.baz
> >
> >
> > On Oct 23, 2013, at 10:17 AM, Jiang, Yunhong
> <yunhong.jiang at intel.com> wrote:
> >
> >> Hi, all
> >> 	I want to debug kernel extension for Mac OSX. However, I have only
> one Mac system currently, is it possible to use Linux as host machine
> remotely?
> >>
> >> Thanks
> >> --jyh
> >>
> >> _______________________________________________
> >> lldb-dev mailing list
> >> lldb-dev at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> >
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev





More information about the lldb-dev mailing list