[Lldb-commits] [PATCH] D132397: [LLDB] Clean up after command fails

2022-08-24 Thread Zequan Wu via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D132397: [LLDB] Clean up after command fails

2022-08-24 Thread Zequan Wu via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D132397: [LLDB] Clean up after command fails

2022-08-24 Thread Jim Ingham via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D132397: [LLDB] Clean up after command fails

2022-08-24 Thread Jim Ingham via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D132397: [LLDB] Clean up after command fails

2022-08-24 Thread Pavel Labath via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D132397: [LLDB] Clean up after command fails

2022-08-22 Thread Zequan Wu via Phabricator via lldb-commits
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