diff options
| author | Jim Ingham <jingham@apple.com> | 2012-06-26 01:21:59 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2012-06-26 01:21:59 +0000 |
| commit | 389512dc5ef12af9652b7af467f6bb960a959170 (patch) | |
| tree | f6adc9439f392e9d1c3949e52e7dad5f9707d235 /lldb/source/API/SBCommandInterpreter.cpp | |
| parent | 4c6f917d3488ba6da95e7efc66ead08f13661080 (diff) | |
| download | bcm5719-llvm-389512dc5ef12af9652b7af467f6bb960a959170.tar.gz bcm5719-llvm-389512dc5ef12af9652b7af467f6bb960a959170.zip | |
Add API logging to SBCommandInterpreter::HandleCompletion().
llvm-svn: 159180
Diffstat (limited to 'lldb/source/API/SBCommandInterpreter.cpp')
| -rw-r--r-- | lldb/source/API/SBCommandInterpreter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp index 31ecfc5319a..7d76212a3a4 100644 --- a/lldb/source/API/SBCommandInterpreter.cpp +++ b/lldb/source/API/SBCommandInterpreter.cpp @@ -123,6 +123,7 @@ SBCommandInterpreter::HandleCompletion (const char *current_line, 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 @@ SBCommandInterpreter::HandleCompletion (const char *current_line, 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 @@ SBCommandInterpreter::HandleCompletion (const char *current_line, 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; } |

