forked from OSchip/llvm-project
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
This commit is contained in:
parent
307b50b0f6
commit
95bbdf6428
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue