[Lldb-commits] [PATCH] D65555: [lldb] [Process/NetBSD] Enable reporting of new and exited threads [WIP]

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 31 23:40:53 PDT 2019


labath added a comment.

Looks fine to me. Minor comments inline.



================
Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:271
+    }
+    SetState(StateType::eStateRunning, true);
+  } break;
----------------
I don't think you need this. Given that you never reported a stop event, as far as the rest of the world is concerned the process is still "running" (i.e., this "stop to notice a new thread" is just an implementation detail).


================
Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:737
+  for (auto it = m_threads.begin(); it != m_threads.end(); ++it) {
+    if (*it && ((*it)->GetID() == thread_id)) {
+      m_threads.erase(it);
----------------
It looks like the rest of the code assumes (as I think it should) that the thread list does not contain null pointers. See e.g. the loop on line 276.


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

https://reviews.llvm.org/D65555





More information about the lldb-commits mailing list