[Lldb-commits] [PATCH] D120320: [lldb/driver] Fix SIGTSTP handling
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 24 03:03:20 PST 2022
labath added inline comments.
================
Comment at: lldb/tools/driver/Driver.cpp:673-674
+static void sigtstp_handler(int signo) {
if (g_driver != nullptr)
g_driver->GetDebugger().SaveInputTerminalState();
----------------
JDevlieghere wrote:
> I see an opportunity for a little RAII helper.
What kind of a helper did you have in mind? Practically the entire function consists of setup and teardown in preparation for the `raise(signo)` call. If I wanted to be fancy I could put all of that in a helper, but I don't think that would make it cleaner. Plus, we also need to be careful about the functions we call from a signal handler, and I really don't know whether e.g. `llvm::make_scope_exit` is guaranteed to not allocate (heap) memory.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120320/new/
https://reviews.llvm.org/D120320
More information about the lldb-commits
mailing list