aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/CommandObject.cpp
diff options
context:
space:
mode:
authorZequan Wu <zequanwu@google.com>2022-08-22 10:26:00 -0700
committerZequan Wu <zequanwu@google.com>2022-08-24 16:00:50 -0700
commitb6d56ddac1bf50d532abdc86a84f9bc8e3e7a266 (patch)
tree0ae5cc71d756dab552399e9744153ae8b4e3b61d /lldb/source/Interpreter/CommandObject.cpp
parent0473ac8876b94fc27f145c48106675b9dedcb20d (diff)
downloadllvm-b6d56ddac1bf50d532abdc86a84f9bc8e3e7a266.zip
llvm-b6d56ddac1bf50d532abdc86a84f9bc8e3e7a266.tar.gz
llvm-b6d56ddac1bf50d532abdc86a84f9bc8e3e7a266.tar.bz2
[LLDB] Clean up after command fails
`CommandObject::CheckRequirements()` requires m_exe_ctx being cleaned up. Differential Revision: https://reviews.llvm.org/D132397
Diffstat (limited to 'lldb/source/Interpreter/CommandObject.cpp')
-rw-r--r--lldb/source/Interpreter/CommandObject.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp
index 719cfbc..5ab3392 100644
--- a/lldb/source/Interpreter/CommandObject.cpp
+++ b/lldb/source/Interpreter/CommandObject.cpp
@@ -741,6 +741,7 @@ bool CommandObjectParsed::Execute(const char *args_string,
if (cmd_args.GetArgumentCount() != 0 && m_arguments.empty()) {
result.AppendErrorWithFormatv("'{0}' doesn't take any arguments.",
GetCommandName());
+ Cleanup();
return false;
}
handled = DoExecute(cmd_args, result);