aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2014-09-17 16:42:50 +0000
committerGreg Clayton <gclayton@apple.com>2014-09-17 16:42:50 +0000
commit95bbdf6428d0711cac8201f1d4ca93d598711295 (patch)
tree3ffaa00c51de9588c23762e0a8e5aa32cc97c918
parent307b50b0f66941a5bbdb7761db57d3572124f783 (diff)
downloadllvm-95bbdf6428d0711cac8201f1d4ca93d598711295.zip
llvm-95bbdf6428d0711cac8201f1d4ca93d598711295.tar.gz
llvm-95bbdf6428d0711cac8201f1d4ca93d598711295.tar.bz2
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. llvm-svn: 217963
-rw-r--r--lldb/source/Target/TargetList.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Target/TargetList.cpp b/lldb/source/Target/TargetList.cpp
index 5ee75ff..7cf31dc 100644
--- a/lldb/source/Target/TargetList.cpp
+++ b/lldb/source/Target/TargetList.cpp
@@ -258,7 +258,11 @@ TargetList::CreateTarget (Debugger &debugger,
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 &debugger,
// 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);
+ }
}
}