[Lldb-commits] [PATCH] D159502: [lldb][AArch64] Add SME's Array Storage (ZA) register
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 13 01:57:11 PDT 2023
DavidSpickett added inline comments.
================
Comment at: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:342
+ // header itself.
+ m_za_ptrace_payload.resize(((m_za_header.vl) * (m_za_header.vl)) +
+ GetZAHeaderSize());
----------------
omjavaid wrote:
> In case of ZA inactive can we avoid having to transfer these zeros over gdb protocol and construct this register on the user side without even doing the transfer?
You could but you'd still need a way to signal to the user side that ZA is in fact inactive. Most obvious way is to send a single 0 and know that if you get that but the streaming vector length is provided too, we must extend the value.
However, that bumps up against a lot of checks in lldb's client side. I know there's at least one that fails if the data received is < the assumed size of the register (for more we just truncate it seems). Bypassing these for 1 target specific register is effort and more importantly, potentially hiding issues. The register size check was actually very useful developing ZA support, so I wouldn't like to subvert it.
GDB also doesn't do anything like this, so we would be compatible with a gdbserver that sent us all the data but an lldb-server wouldn't be compatible with a gdb because it only sends a bit of the data.
You're right that there's scope to compress the data here but it seems better done at a protocol level or by adding some kind of new way to describe registers overall.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159502/new/
https://reviews.llvm.org/D159502
More information about the lldb-commits
mailing list