<div dir="ltr">Ahh thanks, you beat me to it.  I was just firing up my Mac to fix this.</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 1, 2015 at 3:58 PM Jim Ingham via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org">lldb-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: jingham<br>
Date: Tue Sep  1 17:56:59 2015<br>
New Revision: 246601<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=246601&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=246601&view=rev</a><br>
Log:<br>
Fix ProcessKDP.cpp for the change in r246578.<br>
<br>
Modified:<br>
    lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp<br>
    lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h<br>
<br>
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=246601&r1=246600&r2=246601&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=246601&r1=246600&r2=246601&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp (original)<br>
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp Tue Sep  1 17:56:59 2015<br>
@@ -131,27 +131,27 @@ ProcessKDP::Terminate()<br>
<br>
<br>
 lldb::ProcessSP<br>
-ProcessKDP::CreateInstance (Target &target,<br>
+ProcessKDP::CreateInstance (TargetSP target_sp,<br>
                             Listener &listener,<br>
                             const FileSpec *crash_file_path)<br>
 {<br>
     lldb::ProcessSP process_sp;<br>
     if (crash_file_path == NULL)<br>
-        process_sp.reset(new ProcessKDP (target, listener));<br>
+        process_sp.reset(new ProcessKDP (target_sp, listener));<br>
     return process_sp;<br>
 }<br>
<br>
 bool<br>
-ProcessKDP::CanDebug(Target &target, bool plugin_specified_by_name)<br>
+ProcessKDP::CanDebug(TargetSP target_sp, bool plugin_specified_by_name)<br>
 {<br>
     if (plugin_specified_by_name)<br>
         return true;<br>
<br>
     // For now we are just making sure the file exists for a given module<br>
-    Module *exe_module = target.GetExecutableModulePointer();<br>
+    Module *exe_module = target_sp->GetExecutableModulePointer();<br>
     if (exe_module)<br>
     {<br>
-        const llvm::Triple &triple_ref = target.GetArchitecture().GetTriple();<br>
+        const llvm::Triple &triple_ref = target_sp->GetArchitecture().GetTriple();<br>
         switch (triple_ref.getOS())<br>
         {<br>
             case llvm::Triple::Darwin:  // Should use "macosx" for desktop and "ios" for iOS, but accept darwin just in case<br>
@@ -176,8 +176,8 @@ ProcessKDP::CanDebug(Target &target, boo<br>
 //----------------------------------------------------------------------<br>
 // ProcessKDP constructor<br>
 //----------------------------------------------------------------------<br>
-ProcessKDP::ProcessKDP(Target& target, Listener &listener) :<br>
-    Process (target, listener),<br>
+ProcessKDP::ProcessKDP(TargetSP target_sp, Listener &listener) :<br>
+    Process (target_sp, listener),<br>
     m_comm("lldb.process.kdp-remote.communication"),<br>
     m_async_broadcaster (NULL, "lldb.process.kdp-remote.async-broadcaster"),<br>
     m_dyld_plugin_name (),<br>
@@ -292,7 +292,9 @@ ProcessKDP::DoConnectRemote (Stream *str<br>
                     uint32_t sub = m_comm.GetCPUSubtype();<br>
                     ArchSpec kernel_arch;<br>
                     kernel_arch.SetArchitecture(eArchTypeMachO, cpu, sub);<br>
-                    m_target.SetArchitecture(kernel_arch);<br>
+                    Target &target = GetTarget();<br>
+<br>
+                    target.SetArchitecture(kernel_arch);<br>
<br>
                     /* Get the kernel's UUID and load address via KDP_KERNELVERSION packet.  */<br>
                     /* An EFI kdp session has neither UUID nor load address. */<br>
@@ -314,7 +316,7 @@ ProcessKDP::DoConnectRemote (Stream *str<br>
                             // from the dSYM, that can load all of the symbols.<br>
                             ModuleSpec module_spec;<br>
                             module_spec.GetUUID() = kernel_uuid;<br>
-                            module_spec.GetArchitecture() = m_target.GetArchitecture();<br>
+                            module_spec.GetArchitecture() = target.GetArchitecture();<br>
<br>
                             // Lookup UUID locally, before attempting dsymForUUID like action<br>
                             module_spec.GetSymbolFileSpec() = Symbols::LocateExecutableSymbolFile(module_spec);<br>
@@ -325,15 +327,15 @@ ProcessKDP::DoConnectRemote (Stream *str<br>
<br>
                             if (module_spec.GetFileSpec().Exists())<br>
                             {<br>
-                                ModuleSP module_sp(new Module (module_spec.GetFileSpec(), m_target.GetArchitecture()));<br>
+                                ModuleSP module_sp(new Module (module_spec.GetFileSpec(), target.GetArchitecture()));<br>
                                 if (module_sp.get() && module_sp->MatchesModuleSpec (module_spec))<br>
                                 {<br>
                                     // Get the current target executable<br>
-                                    ModuleSP exe_module_sp (m_target.GetExecutableModule ());<br>
+                                    ModuleSP exe_module_sp (target.GetExecutableModule ());<br>
<br>
                                     // Make sure you don't already have the right module loaded and they will be uniqued<br>
                                     if (exe_module_sp.get() != module_sp.get())<br>
-                                        m_target.SetExecutableModule (module_sp, false);<br>
+                                        target.SetExecutableModule (module_sp, false);<br>
                                 }<br>
                             }<br>
                         }<br>
@@ -352,7 +354,7 @@ ProcessKDP::DoConnectRemote (Stream *str<br>
                     SetID (1);<br>
                     GetThreadList ();<br>
                     SetPrivateState (eStateStopped);<br>
-                    StreamSP async_strm_sp(m_target.GetDebugger().GetAsyncOutputStream());<br>
+                    StreamSP async_strm_sp(target.GetDebugger().GetAsyncOutputStream());<br>
                     if (async_strm_sp)<br>
                     {<br>
                         const char *cstr;<br>
<br>
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h?rev=246601&r1=246600&r2=246601&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h?rev=246601&r1=246600&r2=246601&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h (original)<br>
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h Tue Sep  1 17:56:59 2015<br>
@@ -39,7 +39,7 @@ public:<br>
     // Constructors and Destructors<br>
     //------------------------------------------------------------------<br>
     static lldb::ProcessSP<br>
-    CreateInstance (lldb_private::Target& target,<br>
+    CreateInstance (lldb::TargetSP target_sp,<br>
                     lldb_private::Listener &listener,<br>
                     const lldb_private::FileSpec *crash_file_path);<br>
<br>
@@ -61,7 +61,7 @@ public:<br>
     //------------------------------------------------------------------<br>
     // Constructors and Destructors<br>
     //------------------------------------------------------------------<br>
-    ProcessKDP(lldb_private::Target& target, lldb_private::Listener &listener);<br>
+    ProcessKDP(lldb::TargetSP target_sp, lldb_private::Listener &listener);<br>
<br>
     virtual<br>
     ~ProcessKDP();<br>
@@ -70,7 +70,7 @@ public:<br>
     // Check if a given Process<br>
     //------------------------------------------------------------------<br>
     virtual bool<br>
-    CanDebug (lldb_private::Target &target,<br>
+    CanDebug (lldb::TargetSP target_sp,<br>
               bool plugin_specified_by_name);<br>
<br>
     virtual lldb_private::CommandObject *<br>
<br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
</blockquote></div>