From 53667f5da1056590c6db64bfbe2628e83115291e Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Sat, 6 Oct 2012 02:02:26 +0000 Subject: In DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule(), if we have a kernel binary, set the target's architecture to match. Include the target's architecture in the ModuleSpec when we're searching for the kext binaries on the local system -- otherwise we won't get a specific slice of a fat file picked out for us and we won't use the returned Module correctly. Remove the redundant attempt to find a file on the local filesystem from this method. In ProcessGDBRemote::CheckForKernel(), if we have a kernel binary in memory, mark the canJIT as false. There is no jitting code in kernel debug sessions. llvm-svn: 165357 --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lldb/source/Plugins/Process/gdb-remote') diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 494785e3bd2..1cc1009dccd 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -511,6 +511,7 @@ ProcessGDBRemote::CheckForKernel (Stream *strm) { m_kernel_load_addr = exe_objfile->GetHeaderAddress().GetFileAddress(); m_dyld_plugin_name = DynamicLoaderDarwinKernel::GetPluginNameStatic(); + SetCanJIT(false); return; } } @@ -569,6 +570,7 @@ ProcessGDBRemote::CheckForKernel (Stream *strm) { m_kernel_load_addr = kernel_addr; m_dyld_plugin_name = DynamicLoaderDarwinKernel::GetPluginNameStatic(); + SetCanJIT(false); return; } } @@ -1981,6 +1983,9 @@ ProcessGDBRemote::IsAlive () return m_gdb_comm.IsConnected() && m_private_state.GetValue() != eStateExited; } +// For kernel debugging, we return the load address of the kernel binary as the +// ImageInfoAddress and we return the DynamicLoaderDarwinKernel as the GetDynamicLoader() +// name so the correct DynamicLoader plugin is chosen. addr_t ProcessGDBRemote::GetImageInfoAddress() { -- cgit v1.2.3