================
@@ -217,19 +220,33 @@ bool 
ProcessFreeBSDKernelCore::DoUpdateThreadList(ThreadList &old_thread_list,
         ReadSignedIntegerFromMemory(FindSymbol("pcb_size"), 4, -1, error);
     lldb::addr_t stoppcbs = FindSymbol("stoppcbs");
 
-    // from FreeBSD sys/param.h
+    // Read stopped_cpus bitmask and mp_maxid for CPU validation
+    lldb::addr_t stopped_cpus = FindSymbol("stopped_cpus");
+
+    // from sys/kern/subr_smp.c
+    uint32_t mp_maxid =
+        ReadUnsignedIntegerFromMemory(FindSymbol("mp_maxid"), 4, 0, error);
+    auto type_system_sp =
+        *GetTarget().GetScratchTypeSystemForLanguage(eLanguageTypeC);
----------------
DavidSpickett wrote:

This can in theory fail, so please check the expected. (in fact I'm surprised 
an assert does not get hit at runtime because you haven't checked for an error)

Also the CompilerType below, check IsValid on it. (99% of other uses don't do 
this but in theory they should)

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