aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectProcess.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-08-10 21:48:41 +0000
committerJim Ingham <jingham@apple.com>2012-08-10 21:48:41 +0000
commite9ce62b663a884bbc261a42f22a5490343a378f9 (patch)
treed2f9a9924e12c387d0a2280c09ece525b32a4b13 /lldb/source/Commands/CommandObjectProcess.cpp
parentbaf53f9ff846905b721e9cf6f626d48752cb9526 (diff)
downloadllvm-e9ce62b663a884bbc261a42f22a5490343a378f9.zip
llvm-e9ce62b663a884bbc261a42f22a5490343a378f9.tar.gz
llvm-e9ce62b663a884bbc261a42f22a5490343a378f9.tar.bz2
Use the file completer for "process launch" arguments.
<rdar://problem/11274012> llvm-svn: 161704
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 97ed205..a940d3b4 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -61,6 +61,30 @@ public:
{
}
+ int
+ HandleArgumentCompletion (Args &input,
+ int &cursor_index,
+ int &cursor_char_position,
+ OptionElementVector &opt_element_vector,
+ int match_start_point,
+ int max_return_elements,
+ bool &word_complete,
+ StringList &matches)
+ {
+ std::string completion_str (input.GetArgumentAtIndex(cursor_index));
+ completion_str.erase (cursor_char_position);
+
+ CommandCompletions::InvokeCommonCompletionCallbacks (m_interpreter,
+ CommandCompletions::eDiskFileCompletion,
+ completion_str.c_str(),
+ match_start_point,
+ max_return_elements,
+ NULL,
+ word_complete,
+ matches);
+ return matches.GetSize();
+ }
+
Options *
GetOptions ()
{