[Lldb-commits] [lldb] r190550 - When target module add/SBTarget::AddModule()'ing, if an architecture isn't specifically
Jason Molenda
jmolenda at apple.com
Wed Sep 11 14:25:47 PDT 2013
Author: jmolenda
Date: Wed Sep 11 16:25:46 2013
New Revision: 190550
URL: http://llvm.org/viewvc/llvm-project?rev=190550&view=rev
Log:
When target module add/SBTarget::AddModule()'ing, if an architecture isn't specifically
requested, use the Target's architecture to pick the correct slice of a universal file.
<rdar://problem/14813869>
Modified:
lldb/trunk/source/API/SBTarget.cpp
lldb/trunk/source/Commands/CommandObjectTarget.cpp
Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=190550&r1=190549&r2=190550&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Wed Sep 11 16:25:46 2013
@@ -1905,6 +1905,8 @@ SBTarget::AddModule (const char *path,
if (triple)
module_spec.GetArchitecture().SetTriple (triple, target_sp->GetPlatform ().get());
+ else
+ module_spec.GetArchitecture() = target_sp->GetArchitecture();
if (symfile)
module_spec.GetSymbolFileSpec ().SetFile(symfile, false);
Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=190550&r1=190549&r2=190550&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Wed Sep 11 16:25:46 2013
@@ -2763,6 +2763,8 @@ protected:
module_spec.GetUUID() = m_uuid_option_group.GetOptionValue ().GetCurrentValue();
if (m_symbol_file.GetOptionValue().OptionWasSet())
module_spec.GetSymbolFileSpec() = m_symbol_file.GetOptionValue().GetCurrentValue();
+ if (!module_spec.GetArchitecture().IsValid())
+ module_spec.GetArchitecture() = target->GetArchitecture();
Error error;
ModuleSP module_sp (target->GetSharedModule (module_spec, &error));
if (!module_sp)
More information about the lldb-commits
mailing list