summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2014-02-06 18:22:44 +0000
committerGreg Clayton <gclayton@apple.com>2014-02-06 18:22:44 +0000
commit9c0b64c92d5e0bbd94f4ebde94eaac76df34cfaf (patch)
tree661a3b45bdcffa90241e8af831e1adf0d2dec7fe /lldb
parentea2bcb9e0750f971a98dfd3d7f2ac27e0aabbcb9 (diff)
downloadbcm5719-llvm-9c0b64c92d5e0bbd94f4ebde94eaac76df34cfaf.tar.gz
bcm5719-llvm-9c0b64c92d5e0bbd94f4ebde94eaac76df34cfaf.zip
The "-n" and "-p" options to the lldb driver no longer worked after recent IOHandler changes, this is now fixed.
<rdar://problem/15962763> llvm-svn: 200930
Diffstat (limited to 'lldb')
-rw-r--r--lldb/tools/driver/Driver.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp
index c11bf59b32e..78d3a7e1c03 100644
--- a/lldb/tools/driver/Driver.cpp
+++ b/lldb/tools/driver/Driver.cpp
@@ -933,6 +933,23 @@ Driver::MainLoop ()
core_file_spec.c_str());
m_debugger.HandleCommand (command_string);;
}
+ else if (!m_option_data.m_process_name.empty())
+ {
+ ::snprintf (command_string,
+ sizeof(command_string),
+ "process attach --name '%s'%s",
+ m_option_data.m_process_name.c_str(),
+ m_option_data.m_wait_for ? " --waitfor" : "");
+ m_debugger.HandleCommand (command_string);
+ }
+ else if (LLDB_INVALID_PROCESS_ID != m_option_data.m_process_pid)
+ {
+ ::snprintf (command_string,
+ sizeof(command_string),
+ "process attach --pid %" PRIu64,
+ m_option_data.m_process_pid);
+ m_debugger.HandleCommand (command_string);
+ }
ExecuteInitialCommands(false);
OpenPOWER on IntegriCloud