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

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 15 11:29:40 PDT 2023


bulbazord added inline comments.


================
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;
+}
----------------
JDevlieghere wrote:
> 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. 
+1. Does it make sense to use a shared_ptr or a unique_ptr for HostThreads? If so, we could use those.


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