[Lldb-commits] [PATCH] D116255: [lldb] [Process/FreeBSDKernel] Support finding all processes

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 28 06:13:43 PST 2021


labath added a comment.

I think I've managed to figure out what the code is doing, but it wouldn't hurt to include a comment giving a high-level overview of what that code is doing and/or splitting it into smaller functions with helpful names.

Can we expect to have a test for this?



================
Comment at: lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp:203
+        ReadCStringFromMemory(td + offset_td_name, thread_name,
+                              fbsd_maxcomlen + 1, error);
+
----------------
sizeof(thread_name)


================
Comment at: lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp:221
+        ThreadSP thread_sp(new ThreadFreeBSDKernel(
+            *this, tid, pcb_addr,
+            llvm::formatv("(pid {0}) {1}/{2}", pid, comm, thread_name)));
----------------
is this going to be unique (for the entire system)?


================
Comment at: lldb/source/Plugins/Process/FreeBSDKernel/ThreadFreeBSDKernel.cpp:29
+                                         std::string thread_name)
+    : Thread(process, tid), m_thread_name(thread_name), m_pcb_addr(pcb_addr) {}
 
----------------
std::move


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

https://reviews.llvm.org/D116255



More information about the lldb-commits mailing list