[Lldb-commits] [lldb] r215165 - Restore the handling of the --arch argument passed to the Driver that was inadvertently
Jim Ingham
jingham at apple.com
Thu Aug 7 16:01:32 PDT 2014
Author: jingham
Date: Thu Aug 7 18:01:31 2014
New Revision: 215165
URL: http://llvm.org/viewvc/llvm-project?rev=215165&view=rev
Log:
Restore the handling of the --arch argument passed to the Driver that was inadvertently
removed in r214319.
<rdar://problem/17948431>
Modified:
lldb/trunk/tools/driver/Driver.cpp
Modified: lldb/trunk/tools/driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=215165&r1=215164&r2=215165&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Driver.cpp (original)
+++ lldb/trunk/tools/driver/Driver.cpp Thu Aug 7 18:01:31 2014
@@ -854,7 +854,12 @@ Driver::MainLoop ()
const size_t num_args = m_option_data.m_args.size();
if (num_args > 0)
{
- commands_stream.Printf("target create \"%s\"", m_option_data.m_args[0].c_str());
+ char arch_name[64];
+ if (m_debugger.GetDefaultArchitecture (arch_name, sizeof (arch_name)))
+ commands_stream.Printf("target create --arch=%s \"%s\"", arch_name, m_option_data.m_args[0].c_str());
+ else
+ commands_stream.Printf("target create \"%s\"", m_option_data.m_args[0].c_str());
+
if (!m_option_data.m_core_file.empty())
{
commands_stream.Printf(" --core \"%s\"", m_option_data.m_core_file.c_str());
More information about the lldb-commits
mailing list