[lldb-dev] Can I use lldb to debug Mac OSX remotely from linux machine
Greg Clayton
gclayton at apple.com
Wed Oct 23 10:41:46 PDT 2013
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/AppleObjCRuntimeV1.h"
#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h"
#include "Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.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
More information about the lldb-dev
mailing list