[Lldb-commits] [lldb] r200930 - The "-n" and "-p" options to the lldb driver no longer worked after recent IOHandler changes, this is now fixed.

Greg Clayton gclayton at apple.com
Thu Feb 6 10:22:44 PST 2014


Author: gclayton
Date: Thu Feb  6 12:22:44 2014
New Revision: 200930

URL: http://llvm.org/viewvc/llvm-project?rev=200930&view=rev
Log:
The "-n" and "-p" options to the lldb driver no longer worked after recent IOHandler changes, this is now fixed.

<rdar://problem/15962763>


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=200930&r1=200929&r2=200930&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Driver.cpp (original)
+++ lldb/trunk/tools/driver/Driver.cpp Thu Feb  6 12:22:44 2014
@@ -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);
 





More information about the lldb-commits mailing list