[Lldb-commits] [lldb] r159180 - /lldb/trunk/source/API/SBCommandInterpreter.cpp

Jim Ingham jingham at apple.com
Mon Jun 25 18:21:59 PDT 2012


Author: jingham
Date: Mon Jun 25 20:21:59 2012
New Revision: 159180

URL: http://llvm.org/viewvc/llvm-project?rev=159180&view=rev
Log:
Add API logging to SBCommandInterpreter::HandleCompletion().

Modified:
    lldb/trunk/source/API/SBCommandInterpreter.cpp

Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=159180&r1=159179&r2=159180&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandInterpreter.cpp (original)
+++ lldb/trunk/source/API/SBCommandInterpreter.cpp Mon Jun 25 20:21:59 2012
@@ -123,6 +123,7 @@
                                         int max_return_elements,
                                         SBStringList &matches)
 {
+    LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     int num_completions = 0;
     
     // Sanity check the arguments that are passed in:
@@ -137,6 +138,10 @@
     if (cursor - current_line > current_line_size || last_char - current_line > current_line_size)
         return 0;
         
+    if (log)
+        log->Printf ("SBCommandInterpreter(%p)::HandleCompletion (current_line=\"%s\", cursor at: %ld, last char at: %ld, match_start_point: %d, max_return_elements: %d)",
+                     m_opaque_ptr, current_line, cursor - current_line, last_char - current_line, match_start_point, max_return_elements);
+                     
     if (m_opaque_ptr)
     {
         lldb_private::StringList lldb_matches;
@@ -146,6 +151,9 @@
         SBStringList temp_list (&lldb_matches);
         matches.AppendList (temp_list);
     }
+    if (log)
+        log->Printf ("SBCommandInterpreter(%p)::HandleCompletion - Found %d completions.", m_opaque_ptr, num_completions);
+        
     return num_completions;
 }
 





More information about the lldb-commits mailing list