This revision was automatically updated to reflect the committed changes.
Closed by commit rGb6d56ddac1bf: [LLDB] Clean up after command fails (authored
by zequanwu).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132397/new/
https://reviews.llvm.org
zequanwu updated this revision to Diff 455311.
zequanwu added a comment.
Add a test case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132397/new/
https://reviews.llvm.org/D132397
Files:
lldb/source/Interpreter/CommandObject.cpp
lldb/test/She
jingham accepted this revision.
jingham added a comment.
This revision is now accepted and ready to land.
Actually, I think this is 100% correct, and corrects an error I made when I
added argument number checking a little while back.
The comments on CheckRequirements say:
Every command should c
jingham added a comment.
Each new command invocation is expected to prime the ExecutionContext before
invoking the command. I don't think there's any situation where one command
should use a previous command's execution context on purpose. So if we're
getting to Execute without the CommandInt
labath added a comment.
I'm not really familiar this code, but could something like
`llvm::make_scope_exit` be useful here?
Also, what is the effect of not calling Cleanup? That subsequent commands fail
in some way? Could we make a test case for that?
Repository:
rG LLVM Github Monorepo
CHA
zequanwu created this revision.
zequanwu added a reviewer: JDevlieghere.
Herald added a project: All.
zequanwu requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
`CommandObject::CheckRequirements()` requires m_exe_ctx being cleaned up.
Repos