[Lldb-commits] [PATCH] D108554: [lldb] Support querying registers via generic names without alt_names

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 13 01:38:22 PDT 2021


labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/source/API/SBFrame.cpp:636-638
+            if (const RegisterInfo *reg_info =
+                    reg_ctx->GetRegisterInfoByName(name)) {
+              value_sp = ValueObjectRegister::Create(frame, reg_ctx, reg_info);
----------------
I like this.


================
Comment at: lldb/source/Target/RegisterContext.cpp:57-59
+  // Try matching generic register names first.  This is consistent with
+  // how aliases work, esp. wrt "sp" generic alias taking precedence over
+  // "sp" pseudo-register on x86_64.
----------------
This isn't just "consistent with" generic aliases taking precedence. This is actually the implementation of that precedence (at least, after we remove the aliases in the other patch. This should just state as a fact that we want the aliases to take priority. The historic trivia can go into the commit message.


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

https://reviews.llvm.org/D108554



More information about the lldb-commits mailing list