================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to