[Lldb-commits] [lldb] r215475 - Fixed launching in shell on haswell enabled Macs to work more than once when you do:
Greg Clayton
gclayton at apple.com
Tue Aug 12 14:39:00 PDT 2014
Author: gclayton
Date: Tue Aug 12 16:38:59 2014
New Revision: 215475
URL: http://llvm.org/viewvc/llvm-project?rev=215475&view=rev
Log:
Fixed launching in shell on haswell enabled Macs to work more than once when you do:
% lldb -x /bin/ls
(lldb) r
(lldb) r
Prior to this fix the first time it would run /usr/bin/arch with "-arch x86_64" the first time and succeed, and fail the second when the target had updated its architecture to x86_64h. We can't specify x86_64h to /usr/bin/arch, it doesn't handle it.
Also fixed it so /usr/bin/arch is only used for Apple triples.
<rdar://problem/17951312>
Modified:
lldb/trunk/source/Target/ProcessLaunchInfo.cpp
Modified: lldb/trunk/source/Target/ProcessLaunchInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ProcessLaunchInfo.cpp?rev=215475&r1=215474&r2=215475&view=diff
==============================================================================
--- lldb/trunk/source/Target/ProcessLaunchInfo.cpp (original)
+++ lldb/trunk/source/Target/ProcessLaunchInfo.cpp Tue Aug 12 16:38:59 2014
@@ -438,7 +438,9 @@ ProcessLaunchInfo::ConvertArgumentsForLa
shell_command.PutCString ("exec");
// Only Apple supports /usr/bin/arch being able to specify the architecture
- if (GetArchitecture().IsValid())
+ if (GetArchitecture().IsValid() && // Valid architecture
+ GetArchitecture().GetTriple().getVendor() == llvm::Triple::Apple && // Apple only
+ GetArchitecture().GetCore() != ArchSpec::eCore_x86_64_x86_64h) // Don't do this for x86_64h
{
shell_command.Printf(" /usr/bin/arch -arch %s", GetArchitecture().GetArchitectureName());
// Set the resume count to 2:
More information about the lldb-commits
mailing list