[Lldb-commits] [PATCH] D100208: [lldb] [Process/Linux] Report fork/vfork stop reason

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 22 08:05:17 PDT 2021


mgorny added inline comments.


================
Comment at: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:932
+
+    std::unique_ptr<NativeProcessProtocol> child_process_up{child_process};
+    Extension expected_ext = is_vfork ? Extension::vfork : Extension::fork;
----------------
labath wrote:
> Store directly into unique_ptr<NativeProcessLinux> above.
Heh, I suppose it started working because we no longer pass-by-reference to `NewSubprocess()`. Cool!


================
Comment at: lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp:401-402
+  m_stop_info.reason = StopReason::eStopReasonFork;
+  m_stop_info.details.fork.child_pid = child_pid;
+  m_stop_info.details.fork.child_tid = child_pid;
+}
----------------
labath wrote:
> duplicated
Sure but that's only on Linux. FreeBSD and NetBSD use distinct thread IDs.


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

https://reviews.llvm.org/D100208



More information about the lldb-commits mailing list