[Lldb-commits] [PATCH] D110027: [lldb] [gdb-remote] Use local regnos for value_regs/invalidate_regs

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 21 01:35:16 PDT 2021


labath added inline comments.


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:4619
+    for (uint32_t &x : remote_reg_info.value_regs) {
+      std::map<uint32_t, uint32_t>::iterator x_lldb =
+          remote_to_local_map.find(x);
----------------
auto :)


================
Comment at: lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:4626-4629
+      std::map<uint32_t, uint32_t>::iterator x_lldb =
+          remote_to_local_map.find(x);
+      x = x_lldb != remote_to_local_map.end() ? x_lldb->second
+                                              : LLDB_INVALID_REGNUM;
----------------
Make this a lambda and then do `llvm::transform(remote_reg_info.invalidate_regs, remote_reg_info.invalidate_regs.begin(), lambda)`


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

https://reviews.llvm.org/D110027



More information about the lldb-commits mailing list