diff options
author | Robert Flack <flackr@gmail.com> | 2015-05-13 00:39:24 +0000 |
---|---|---|
committer | Robert Flack <flackr@gmail.com> | 2015-05-13 00:39:24 +0000 |
commit | 8ec55a53a73ef1812c54e091c80ffb3d6ccf177d (patch) | |
tree | e2029b8df29ead1d82d3e0bbd8fd8fb23c7f9bbd /lldb/source/Target/TargetList.cpp | |
parent | 4d1a3ef659ee0c354cc3d7380529a844c56939f6 (diff) | |
download | bcm5719-llvm-8ec55a53a73ef1812c54e091c80ffb3d6ccf177d.tar.gz bcm5719-llvm-8ec55a53a73ef1812c54e091c80ffb3d6ccf177d.zip |
Don't change the selected platform when creating the dummy target.
A dummy target is used by TargetList::CreateTargetInternal to prime newly
created targets. the first time this is done it creates the dummy target. The
dummy target is created with the host platform (See
TargetList::CreateDummyTarget) which results in switching the selected platform
back to the host platform even when creating a target for a different platform.
This change avoids changing the selected platform while creating the dummy
target to prevent this side effect.
Test Plan:
./dotest.py $DOTEST_OPTS -t -p TestCreateAfterAttach.py
Tests using process attach (e.g. TestCreateAfterAttach.py, TestHelloWorld.py)
now run successfully mac -> linux.
Differential Revision: http://reviews.llvm.org/D9712
llvm-svn: 237221
Diffstat (limited to 'lldb/source/Target/TargetList.cpp')
-rw-r--r-- | lldb/source/Target/TargetList.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Target/TargetList.cpp b/lldb/source/Target/TargetList.cpp index 35ee521d65b..b5636dfea84 100644 --- a/lldb/source/Target/TargetList.cpp +++ b/lldb/source/Target/TargetList.cpp @@ -300,7 +300,7 @@ TargetList::CreateTargetInternal (Debugger &debugger, if (!platform_sp->IsCompatibleArchitecture(arch, false, &platform_arch)) { platform_sp = Platform::GetPlatformForArchitecture(arch, &platform_arch); - if (platform_sp) + if (!is_dummy_target && platform_sp) debugger.GetPlatformList().SetSelectedPlatform(platform_sp); } } @@ -312,7 +312,7 @@ TargetList::CreateTargetInternal (Debugger &debugger, if (!platform_sp->IsCompatibleArchitecture(platform_arch, false, &fixed_platform_arch)) { platform_sp = Platform::GetPlatformForArchitecture(platform_arch, &fixed_platform_arch); - if (platform_sp) + if (!is_dummy_target && platform_sp) debugger.GetPlatformList().SetSelectedPlatform(platform_sp); } } |