labath added inline comments.

================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:4684
+    std::map<uint32_t, uint32_t> remote_to_local_map;
     for (RemoteRegisterInfo& remote_reg_info : registers) {
+      // Assign successive remote regnums if missing.
----------------
drop `local_regnum` and use `llvm::enumerate`


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:4699
+      for (uint32_t &x : remote_reg_info.value_regs) {
+        if (x != LLDB_INVALID_REGNUM)
+          x = remote_to_local_map[x];
----------------
Why should we have `LLDB_INVALID_REGNUM` in this list?

I think that a more interesting question is what to do if the value is not 
located in the `remote_to_local_map`. This will map it to zero, which isn't 
very useful. I suppose we could just drop this value -- this is something that 
was probably happening already (if we weren't just crashing).


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

https://reviews.llvm.org/D110027

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

Reply via email to