[Lldb-commits] [lldb] r156796 - in /lldb/trunk/source: Host/common/Host.cpp Target/Target.cpp
Greg Clayton
gclayton at apple.com
Mon May 14 19:44:13 PDT 2012
Author: gclayton
Date: Mon May 14 21:44:13 2012
New Revision: 156796
URL: http://llvm.org/viewvc/llvm-project?rev=156796&view=rev
Log:
<rdar://problem/11451919>
Fixed the test suite not working on i386 due to recent default arch detection changes.
Modified:
lldb/trunk/source/Host/common/Host.cpp
lldb/trunk/source/Target/Target.cpp
Modified: lldb/trunk/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=156796&r1=156795&r2=156796&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Host.cpp (original)
+++ lldb/trunk/source/Host/common/Host.cpp Mon May 14 21:44:13 2012
@@ -1231,10 +1231,12 @@
if (!g_dummy_target_sp)
{
- ArchSpec default_arch(Target::GetDefaultArchitecture());
+ ArchSpec arch(Target::GetDefaultArchitecture());
+ if (!arch.IsValid())
+ arch = Host::GetArchitecture ();
Error err = debugger.GetTargetList().CreateTarget(debugger,
FileSpec(),
- default_arch.GetTriple().getTriple().c_str(),
+ arch.GetTriple().getTriple().c_str(),
false,
NULL,
g_dummy_target_sp);
Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=156796&r1=156795&r2=156796&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Mon May 14 21:44:13 2012
@@ -1512,12 +1512,9 @@
Target::GetDefaultArchitecture ()
{
lldb::UserSettingsControllerSP settings_controller_sp (GetSettingsController());
- ArchSpec default_arch;
if (settings_controller_sp)
- default_arch = static_cast<Target::SettingsController *>(settings_controller_sp.get())->GetArchitecture ();
- if (!default_arch.IsValid())
- default_arch = Host::GetArchitecture ();
- return default_arch;
+ return static_cast<Target::SettingsController *>(settings_controller_sp.get())->GetArchitecture ();
+ return ArchSpec();
}
void
More information about the lldb-commits
mailing list