================
@@ -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);
----------------
jasonmolenda wrote:

I think the real question we need to decide:  If the remote stub says a 
register cannot be read, should we allow the user to retry that by doing 
another register read?   If the remote stub provides partial bytes, should we 
allow the user to retry that?

The only argument for partial-bytes that I can imagine is a g/G packet that is 
shorter than the entire register context size.  But we're imagining a g/G that 
has PART of one register.  When hopefully what we would see is e.g. a g/G that 
gives you all the GPRs but doesn't include the FPRs, and then when the user 
tries to read an FPR, we fetch it with p/P.  It seems very bad if we get 
partial bytes for a register.

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