================
@@ -225,11 +235,23 @@ bool 
ProcessFreeBSDKernelCore::DoUpdateThreadList(ThreadList &old_thread_list,
     // the end of the list, so we have to walk it backwards. First collect all
     // the processes in the list order.
     std::vector<lldb::addr_t> process_addrs;
-    for (lldb::addr_t proc =
-             ReadPointerFromMemory(FindSymbol("allproc"), error);
-         proc != 0 && proc != LLDB_INVALID_ADDRESS;
-         proc = ReadPointerFromMemory(proc + offset_p_list, error)) {
-      process_addrs.push_back(proc);
+
+    lldb::addr_t zombproc_addr = FindSymbol("zombproc");
----------------
DavidSpickett wrote:

Since this is only used in the loop:
```
if (lldb::addr_t zombproc_addr = FindSymbol("zombproc"); zombproc_addr != 
LLDB_INVALID_ADDRESS) {
...
```
Same for allproc if it's only used within the if.

https://github.com/llvm/llvm-project/pull/183981
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to