================
@@ -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");
+ if (zombproc_addr != LLDB_INVALID_ADDRESS) {
+ for (lldb::addr_t proc = ReadPointerFromMemory(zombproc_addr, error);
+ proc != 0 && proc != LLDB_INVALID_ADDRESS;
+ proc = ReadPointerFromMemory(proc + offset_p_list, error)) {
+ process_addrs.push_back(proc);
+ }
+ }
+
+ lldb::addr_t allproc_addr = FindSymbol("allproc");
+ if (allproc_addr != LLDB_INVALID_ADDRESS) {
+ for (lldb::addr_t proc = ReadPointerFromMemory(allproc_addr, error);
----------------
DavidSpickett wrote:
And even if that's not possible, it looks weird to not check the error. So I
would add it just for clarity even if it's redundant.
https://github.com/llvm/llvm-project/pull/183981
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits