[Lldb-commits] [lldb] r217963 - If a new platform is created/selected for an architecture, make it the selected platform so you can do things like:
Greg Clayton
gclayton at apple.com
Wed Sep 17 09:42:50 PDT 2014
Author: gclayton
Date: Wed Sep 17 11:42:50 2014
New Revision: 217963
URL: http://llvm.org/viewvc/llvm-project?rev=217963&view=rev
Log:
If a new platform is created/selected for an architecture, make it the selected platform so you can do things like:
% lldb ios-executable
(lldb) platform connect connect://localhost:11111
Prior to this fix, the host platform would be selected even though the target was using the ios-remote platform.
Modified:
lldb/trunk/source/Target/TargetList.cpp
Modified: lldb/trunk/source/Target/TargetList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/TargetList.cpp?rev=217963&r1=217962&r2=217963&view=diff
==============================================================================
--- lldb/trunk/source/Target/TargetList.cpp (original)
+++ lldb/trunk/source/Target/TargetList.cpp Wed Sep 17 11:42:50 2014
@@ -258,7 +258,11 @@ TargetList::CreateTarget (Debugger &debu
if (!prefer_platform_arch && arch.IsValid())
{
if (!platform_sp->IsCompatibleArchitecture(arch, false, &platform_arch))
+ {
platform_sp = Platform::GetPlatformForArchitecture(arch, &platform_arch);
+ if (platform_sp)
+ debugger.GetPlatformList().SetSelectedPlatform(platform_sp);
+ }
}
else if (platform_arch.IsValid())
{
@@ -266,7 +270,11 @@ TargetList::CreateTarget (Debugger &debu
// a single architecture which should be used
ArchSpec fixed_platform_arch;
if (!platform_sp->IsCompatibleArchitecture(platform_arch, false, &fixed_platform_arch))
+ {
platform_sp = Platform::GetPlatformForArchitecture(platform_arch, &fixed_platform_arch);
+ if (platform_sp)
+ debugger.GetPlatformList().SetSelectedPlatform(platform_sp);
+ }
}
}
More information about the lldb-commits
mailing list