================
@@ -274,23 +295,31 @@ bool GDBRemoteRegisterContext::ReadRegisterBytes(const 
RegisterInfo *reg_info) {
           success = false;
         else {
           // Read the containing register if it hasn't already been read
-          if (!GetRegisterIsValid(prim_reg))
+          if (GetRegisterIsUnfetched(prim_reg))
             success = GetPrimordialRegister(prim_reg_info, gdb_comm);
----------------
JDevlieghere wrote:

I wonder whether we need to change `success` from a boolean to an enum `{Valid, 
Unavailable, Failure}` and avoid setting a register to unavailable unless the 
stub explicitly told us to do so. For example, a few lines up we set success to 
false if `prim_reg_info == nullptr` which isn't the stub telling us the 
register is unavailable.

https://github.com/llvm/llvm-project/pull/193894
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to