[Lldb-commits] [PATCH] Fix lldb OS X build

Keno Fischer kfischer at college.harvard.edu
Wed Aug 6 14:06:17 PDT 2014


Hi zturner,

Two changes:
 - The first is a new constant introduced in XCode 6, so we do the same thing as for CPU_SUBTYPE_X86_64_H
 - The second is small fix to the commit adding Host/Socket to make it build on OS X

http://reviews.llvm.org/D4815

Files:
  source/Host/common/Host.cpp
  source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp

Index: source/Host/common/Host.cpp
===================================================================
--- source/Host/common/Host.cpp
+++ source/Host/common/Host.cpp
@@ -40,6 +40,9 @@
 #ifndef CPU_SUBTYPE_X86_64_H
 #define CPU_SUBTYPE_X86_64_H ((cpu_subtype_t)8)
 #endif
+#ifndef CPU_TYPE_ARM64
+#define CPU_TYPE_ARM64 (CPU_TYPE_ARM|CPU_ARCH_ABI64)
+#endif
 #endif
 
 #if defined (__linux__) || defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) || defined(__NetBSD__)
Index: source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
===================================================================
--- source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -22,6 +22,7 @@
 #include "lldb/Core/UUID.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Host/Symbols.h"
+#include "lldb/Host/Socket.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandObject.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
@@ -272,8 +273,8 @@
 
     if (conn_ap->IsConnected())
     {
-        const Socket& socket = static_cast<const Socket&>(conn_ap->GetReadObject());
-        const uint16_t reply_port = socket.GetPort();
+        const Socket& socket = static_cast<const Socket&>(*conn_ap->GetReadObject());
+        const uint16_t reply_port = socket.GetPortNumber();
 
         if (reply_port != 0)
         {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4815.12250.patch
Type: text/x-patch
Size: 1417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140806/6c613e3a/attachment.bin>


More information about the lldb-commits mailing list