omjavaid added a comment.

In D77043#2515233 <https://reviews.llvm.org/D77043#2515233>, @labath wrote:

> There's still one "opportunistic" snippet in `GDBRemoteRegisterContext.cpp`, 
> around line 404. Did you forget about that, or is there something special 
> about that case? (if so, then what?)

Answer inline.



================
Comment at: 
lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp:404
                reg = reg_info->invalidate_regs[++idx]) {
+            uint32_t lldb_regnum = ConvertRegisterKindToRegisterNumber(
+                eRegisterKindProcessPlugin, reg);
----------------
Using ConvertRegisterKindToRegisterNumber because SetRegisterIsValid requires 
register number as input unlike other instances where we needed to get register 
info.


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:1768
+                eRegisterKindProcessPlugin, pair.first);
+        gdb_thread->PrivateSetRegisterValue(lldb_regnum, buffer_sp->GetData());
       }
----------------
Here also we used ConvertRegisterKindToRegisterNumber because 
PrivateSetRegisterValue requires register number as input unlike other 
instances where we needed to get register info.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77043/new/

https://reviews.llvm.org/D77043

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to