llvm-project
6dd52127 - [lldb][Process/FreeBSDKernelCore] Improve DoUpdateThreadList() (#183981)

Commit
52 days ago
[lldb][Process/FreeBSDKernelCore] Improve DoUpdateThreadList() (#183981) This commit brings improves `ProcessFreeBSDKernelCore::DoUpdateThreadList()` by porting features from KGDB (`fbsd_kthr.c` specifically) and adding fixes. It includes: 1. Validate `stopped_cpus` before accessing `stoppcbs` 2. Check bounds for `mp_maxid` 3. Check errors when reading proc from memory 4. Detect new architectures from previous PRs (ppc64le, riscv64, arm) which weren't handled correctly in `DoUpdateThreadList()`. Fallbacks for finding offsets aren't ported since kernel exposes hardcoded variables for offsets starting from FreeBSD 11. Fallbacks aren't needed as LLDB 23 only supports FreeBSD 14 and later. This commit also Fixes: 2430410b7d879fce3db76c21bb8c60ed22abd0b5(#180669), 4a602c03ea050d7adf666d5a440164ca6f78707c(#180670), 3d251288df0642762d1bd86efa05e190005c2539(#180674) --------- Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Author
Parents
Loading