[Lldb-commits] [PATCH] D91241: [LLDB] Make offset field optional in RegisterInfo packet for Arm64
Muhammad Omair Javaid via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 12 05:52:47 PST 2020
omjavaid added a comment.
In D91241#2391126 <https://reviews.llvm.org/D91241#2391126>, @labath wrote:
> That's a good point. Maybe this does need to be a two-pass algorithm (first compute the offsets of primary registers, then fill out subregs). But that doesn't mean the two passes should be in two completely separate files. It would still be better if that was done in a single place. Maybe we can move all the offset computation out of the parsing loop and into a separate helper function. Doing the computation inside the loop is not really correct anyway, as the registers in the target.xml don't have to come in ascending regnum order (all stubs probably send them that way, but I don't think they _have_ to do that).
I guess GDB standard does enforce ascending order, here is what it says about regnum:
"The register’s number. If omitted, a register’s number is one greater than that of the previous register (either in the current feature or in a preceding feature); the first register in the target description defaults to zero. This register number is used to read or write the register; e.g. it is used in the remote p and P packets, and registers appear in the g and G packets in order of increasing register number."
CHANGES SINCE LAST ACTION
More information about the lldb-commits