[Lldb-commits] [patch] mac-os platforms & file types and runtime are not actually mac specific

Carlo Kok ck at remobjects.com
Thu Sep 26 11:06:06 PDT 2013


They should be initialized so someone can remote debug to the mac.

-- 
Carlo Kok
RemObjects Software
-------------- next part --------------
Index: lldb.cpp
===================================================================
--- lldb.cpp	(revision 191382)
+++ lldb.cpp	(working copy)
@@ -47,19 +47,19 @@
 #ifndef LLDB_DISABLE_PYTHON
 #include "Plugins/OperatingSystem/Python/OperatingSystemPython.h"
 #endif
+#include "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h"
 #if defined (__APPLE__)
-#include "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h"
 #include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h"
+#include "Plugins/Process/MacOSX-Kernel/ProcessKDP.h"
+#include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h"
+#endif
+#include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
+#include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h"
+#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.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
 
 #include "Plugins/Process/mach-core/ProcessMachCore.h"
 
@@ -120,23 +120,23 @@
         OperatingSystemPython::Initialize();
 #endif
 
+        AppleObjCRuntimeV2::Initialize();
+        AppleObjCRuntimeV1::Initialize();
+        ObjectContainerUniversalMachO::Initialize();
+        ObjectFileMachO::Initialize();
+        PlatformRemoteiOS::Initialize();
+        PlatformMacOSX::Initialize();
+        PlatformiOSSimulator::Initialize();
+        DynamicLoaderMacOSXDYLD::Initialize();
 #if defined (__APPLE__)
         //----------------------------------------------------------------------
         // Apple/Darwin hosted plugins
         //----------------------------------------------------------------------
-        DynamicLoaderMacOSXDYLD::Initialize();
+        SymbolVendorMacOSX::Initialize();
         DynamicLoaderDarwinKernel::Initialize();
-        AppleObjCRuntimeV2::Initialize();
-        AppleObjCRuntimeV1::Initialize();
-        ObjectContainerUniversalMachO::Initialize();
-        ObjectFileMachO::Initialize();
         ProcessKDP::Initialize();
         ProcessMachCore::Initialize();
-        SymbolVendorMacOSX::Initialize();
         PlatformDarwinKernel::Initialize();
-        PlatformRemoteiOS::Initialize();
-        PlatformMacOSX::Initialize();
-        PlatformiOSSimulator::Initialize();
 #endif
 #if defined (__linux__)
         //----------------------------------------------------------------------
Index: Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
===================================================================
--- Plugins/Process/Utility/RegisterContextDarwin_arm.cpp	(revision 191382)
+++ Plugins/Process/Utility/RegisterContextDarwin_arm.cpp	(working copy)
@@ -7,13 +7,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#if defined(__APPLE__)
 
 #include "RegisterContextDarwin_arm.h"
 
-// C Includes
-#include <mach/mach_types.h>
-#include <mach/thread_act.h>
 
 // C++ Includes
 // Other libraries and framework includes
@@ -37,6 +33,10 @@
 #include "ARM_GCC_Registers.h"
 #include "ARM_DWARF_Registers.h"
 
+#define KERN_SUCCESS                      0
+#define KERN_INVALID_ARGUMENT             4
+
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -1223,4 +1223,3 @@
     return false;
 }
 
-#endif


More information about the lldb-commits mailing list