[lldb] [Process/NetBSD] Fix crash on unsupported i386 regs
Multiple fixes related to bugs discovered while debugging a crash when reading all registers on i386. The underlying problem was that GetSetForNativeRegNum() did not account for MPX registers on i386, and since it only compared against upper bounds of each known register set, the MPX registers were classified into the wrong set and therefore considered supported. However, they were not expected in RegNumX86ToX86_64() and caused the assertion to fail. This includes: - adding (unused) i386 → x86_64 translations for MPX registers - fixing GetSetForNativeRegNum() to check both lower and upper bound for register sets, to avoid wrongly classifying unhandled register sets - adding missing range check for MPX registers on i386 - renaming k_last_mpxr to k_last_mpxr_i386 for consistency - replacing return-assertions with llvm_unreachable() and adding more checks for unexpected parameters Differential Revision: https://reviews.llvm.org/D88682
Loading
Please sign in to comment