[Lldb-commits] [PATCH] D109695: [lldb] [Process/gdb-remote] Add x31 AArch64 register for gdbserver

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 14 01:27:47 PDT 2021


mgorny added a comment.

In D109695#2999171 <https://reviews.llvm.org/D109695#2999171>, @labath wrote:

> Let's take a step back. First, I'd like to understand why are you adding a whole new register, instead of just an alias (alt_name) for an existing register.

Well, I was thinking 'what if the register has already another alt_name?' While it's unlikely that such a thing would happen with gdbserver, it's valid input in the end, and adding a new register seemed a more reliable solution for arbitrary input.

> And second, have you considered putting this into the ABI plugin, as that's where the rest of the "augmentation" code lives (or most of it, anyway).

I initially did, yes, and I've figured out that it doesn't belong there since 1) these assignments aren't really specific to a single ABI but are general architecture characteristics, and 2) the logic is really specific to the gdb-remote plugin.

I mean, putting things like generic regno assignments into ABI makes sense because different ABIs could use different registers for given purpose. However, things like ESP being derived from RSP or aliasing sp to x31 seem ABI-independent.

That said, I don't feel strongly about it.


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

https://reviews.llvm.org/D109695



More information about the lldb-commits mailing list