summaryrefslogtreecommitdiffstats
path: root/lldb/tools/driver/Driver.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2014-08-07 23:01:31 +0000
committerJim Ingham <jingham@apple.com>2014-08-07 23:01:31 +0000
commit5b1fe95dd7a74e0a5de94f48c4e81e407f4e0769 (patch)
tree63ef1e641b9a8ce78da804009011a837f7eeac38 /lldb/tools/driver/Driver.cpp
parentb3e5654923e074b7f5ebb1e7c54519e2911a06f7 (diff)
downloadbcm5719-llvm-5b1fe95dd7a74e0a5de94f48c4e81e407f4e0769.tar.gz
bcm5719-llvm-5b1fe95dd7a74e0a5de94f48c4e81e407f4e0769.zip
Restore the handling of the --arch argument passed to the Driver that was inadvertently
removed in r214319. <rdar://problem/17948431> llvm-svn: 215165
Diffstat (limited to 'lldb/tools/driver/Driver.cpp')
-rw-r--r--lldb/tools/driver/Driver.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp
index e1ae8a04a87..854310031c3 100644
--- a/lldb/tools/driver/Driver.cpp
+++ b/lldb/tools/driver/Driver.cpp
@@ -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());
OpenPOWER on IntegriCloud