[Lldb-commits] [PATCH] D145136: Add a Debugger interruption mechanism in parallel to the Command Interpreter interruption

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 15 10:14:57 PDT 2023


JDevlieghere added inline comments.


================
Comment at: lldb/source/Core/Debugger.cpp:1220-1221
+    return m_interrupt_requested != 0;
+  } else
+    return GetCommandInterpreter().WasInterrupted();
+}
----------------
Nit: else-after-return. 


================
Comment at: lldb/source/Core/Debugger.cpp:1973-1977
+HostThread &Debugger::SetIOHandlerThread(HostThread &new_thread) {
+  HostThread &old_host = m_io_handler_thread;
+  m_io_handler_thread = new_thread;
+  return old_host;
+}
----------------
This doesn't look right. You're taking a reference to the old thread, and then immediately change it below. If you want to return the old thread, old_host should be a copy. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145136/new/

https://reviews.llvm.org/D145136



More information about the lldb-commits mailing list