[Lldb-commits] [lldb] [lldb] New expedited register specfication for unavailable regs (PR #193894)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon May 4 23:02:11 PDT 2026


================
@@ -1752,12 +1752,16 @@ void ProcessGDBRemote::ParseExpeditedRegisters(
   RegisterContextSP gdb_reg_ctx_sp(gdb_thread->GetRegisterContext());
 
   for (const auto &pair : expedited_register_map) {
+    uint32_t lldb_regnum = gdb_reg_ctx_sp->ConvertRegisterKindToRegisterNumber(
+        eRegisterKindProcessPlugin, pair.first);
     StringExtractor reg_value_extractor(pair.second);
+    if (reg_value_extractor.GetStringRef().empty()) {
+      gdb_thread->PrivateSetRegisterUnavailable(lldb_regnum);
----------------
JDevlieghere wrote:

Should this check `LLDB_INVALID_REGNUM` first? Otherwise this may trip the assert in `SetRegisterIsValidState`?

https://github.com/llvm/llvm-project/pull/193894


More information about the lldb-commits mailing list