[Lldb-commits] [lldb] New ThreadPlanSingleThreadTimeout to resolve potential deadlock in single thread stepping (PR #90930)
via lldb-commits
lldb-commits at lists.llvm.org
Wed May 22 17:33:21 PDT 2024
================
@@ -1125,6 +1125,38 @@ class StopInfoUnixSignal : public StopInfo {
std::optional<int> m_code;
};
+// StopInfoInterrupt
+
+class StopInfoInterrupt : public StopInfo {
+public:
+ StopInfoInterrupt(Thread &thread, int signo, const char *description)
+ : StopInfo(thread, signo) {
+ SetDescription(description);
+ }
+
+ ~StopInfoInterrupt() override = default;
+
+ StopReason GetStopReason() const override {
+ return lldb::eStopReasonInterrupt;
+ }
+
+ bool ShouldStopSynchronous(Event *event_ptr) override { return true; }
+
+ bool ShouldStop(Event *event_ptr) override {
+ ThreadSP thread_sp(m_thread_wp.lock());
+ if (thread_sp)
+ return thread_sp->GetProcess()->GetUnixSignals()->GetShouldStop(m_value);
----------------
jimingham wrote:
I don't think this is right. This is a signal that you are using to implement your async interrupt. So you shouldn't be governed by whether the user would or would not want to stop for that signal if it had been generated by some other means.
https://github.com/llvm/llvm-project/pull/90930
More information about the lldb-commits
mailing list