mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 04:46:27 +08:00
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:
@@ -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 ()
|
||||
{
|
||||
|
||||
@@ -233,6 +233,9 @@ public:
|
||||
bool
|
||||
RemoteIsEFI ();
|
||||
|
||||
bool
|
||||
RemoteIsDarwinKernel ();
|
||||
|
||||
lldb::addr_t
|
||||
GetLoadAddress ();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user