summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectCommands.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2012-05-31 01:09:06 +0000
committerEnrico Granata <egranata@apple.com>2012-05-31 01:09:06 +0000
commit5f5ab60274277be5af7765d0fd288fe2c454e164 (patch)
tree3e1b6dee9fc78ddfa1b29edc90d45be6fbf9c7a7 /lldb/source/Commands/CommandObjectCommands.cpp
parent368461cad0cbbb7e7c2151dd4ca0412d8d71c21a (diff)
downloadbcm5719-llvm-5f5ab60274277be5af7765d0fd288fe2c454e164.tar.gz
bcm5719-llvm-5f5ab60274277be5af7765d0fd288fe2c454e164.zip
<rdar://problem/11328896> Fixing a bug where regex commands were saved in the history even if they came from a 'command sourced' file - this fix introduces a command sourcing depth and disables history for all levels of depth > 0, which means no commands go into history when being sourced from a file. we need an integer depth because command files might themselves source other command files, ...
llvm-svn: 157727
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index c881a6feea6..7bbf943913d 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -284,7 +284,8 @@ public:
m_options.m_stop_on_continue,
m_options.m_stop_on_error,
echo_commands,
- print_results,
+ print_results,
+ eLazyBoolCalculate,
result);
}
else
@@ -295,6 +296,36 @@ public:
return result.Succeeded();
}
+
+ virtual const char*
+ GetRepeatCommand (Args &current_command_args, uint32_t index)
+ {
+ return "";
+ }
+
+ 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();
+ }
};
OptionDefinition
OpenPOWER on IntegriCloud