aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
diff options
context:
space:
mode:
authorMed Ismail Bennani <medismail.bennani@gmail.com>2020-07-22 13:07:12 +0200
committerMed Ismail Bennani <medismail.bennani@gmail.com>2020-07-23 13:05:45 +0200
commit85fbb08fa2ac5195dc7a2f13eea7de1471da2a21 (patch)
tree13ba8b1a3e99f80ea80bc5c88c0cfb12e78b27d8 /lldb/source/Interpreter/CommandInterpreter.cpp
parentf758d72eb852e3cb21acbf9ab8e5464adc689367 (diff)
downloadllvm-85fbb08fa2ac5195dc7a2f13eea7de1471da2a21.zip
llvm-85fbb08fa2ac5195dc7a2f13eea7de1471da2a21.tar.gz
llvm-85fbb08fa2ac5195dc7a2f13eea7de1471da2a21.tar.bz2
[lldb/interpreter] Move the history subcommand to session (NFCI)
This patch moves the `history` subcommand from the `command` to `session` command. I think it makes more sense to have it there because as the `command` usage suggests, it should be used to manage custom LLDB commands. However, `history` is essentially tied to a debugging session and holds all the commands (not specifically custom ones). This also makes it more discoverable by adding an alias for it (mimicking the shell builtin). Differential Revision: https://reviews.llvm.org/D84307 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index ed4ed0c..50a69b2 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -457,6 +457,11 @@ void CommandInterpreter::Initialize() {
if (cmd_obj_sp) {
AddAlias("re", cmd_obj_sp);
}
+
+ cmd_obj_sp = GetCommandSPExact("session history", false);
+ if (cmd_obj_sp) {
+ AddAlias("history", cmd_obj_sp);
+ }
}
void CommandInterpreter::Clear() {