Add an explicit check for a darwin kernel KDP_VERSIONSTRING when

starting a kdp communication session, instead of assuming darwin
kernel for any "non-EFI" kdp session.
<rdar://problem/13854098>

llvm-svn: 181566
This commit is contained in:
Jason Molenda
2013-05-09 23:52:21 +00:00
parent 139474d498
commit ca2ffa7e65
3 changed files with 16 additions and 2 deletions

View File

@@ -544,6 +544,17 @@ CommunicationKDP::RemoteIsEFI ()
return false;
}
bool
CommunicationKDP::RemoteIsDarwinKernel ()
{
if (GetKernelVersion() == NULL)
return false;
if (m_kernel_version.find("Darwin Kernel") != std::string::npos)
return true;
else
return false;
}
lldb::addr_t
CommunicationKDP::GetLoadAddress ()
{

View File

@@ -233,6 +233,9 @@ public:
bool
RemoteIsEFI ();
bool
RemoteIsDarwinKernel ();
lldb::addr_t
GetLoadAddress ();

View File

@@ -242,13 +242,13 @@ ProcessKDP::DoConnectRemote (Stream *strm, const char *remote_url)
{
m_dyld_plugin_name = DynamicLoaderStatic::GetPluginNameStatic();
}
else
else if (m_comm.RemoteIsDarwinKernel ())
{
m_dyld_plugin_name = DynamicLoaderDarwinKernel::GetPluginNameStatic();
if (kernel_load_addr != LLDB_INVALID_ADDRESS)
{
m_kernel_load_addr = kernel_load_addr;
}
m_dyld_plugin_name = DynamicLoaderDarwinKernel::GetPluginNameStatic();
}
// Set the thread ID