[Lldb-commits] [PATCH] D74244: [lldb] Delete register info definitions in the x86_64 ABI classes

Jason Molenda via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 10 14:24:50 PST 2020


jasonmolenda accepted this revision.
jasonmolenda added a comment.
This revision is now accepted and ready to land.

Nice elimination of duplication.



================
Comment at: lldb/source/Target/ABI.cpp:249
+  int eh = -1;
+  int dwarf = -1;
+  for (unsigned reg = 0; reg < m_mc_register_info_up->getNumRegs(); ++reg) {
----------------
Would it be simpler to assign these to `LLDB_INVALID_REGNUM` at the beginning, instead of -1 and setting it later?


================
Comment at: lldb/source/Target/ABI.cpp:267
+  if (name_ref.consume_front(from_prefix) && to_integer(name_ref, _, 10))
+    name = (to_prefix + name_ref).str();
+}
----------------
will `to_integer` bit work with an all-letter reg like `cpsr`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74244





More information about the lldb-commits mailing list