Re: gdb XML type for SME ZA storage
Luis via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CANnS9ruMH-VeRN+SXrP2uOxkMg=mDTZWab=3R7-77Aa8apGEFQ@mail.gmail.com> |
The documentation is probably off here, as the intention was to have a 2-dimensional array of bytes. Let me confirm that and then I can fix the documentation. On Thu, Sep 11, 2025, 18:28 Peter Maydell <[email protected]> wrote: > Hi; in implementing the QEMU gdbstub handling for SME registers, > we're not sure about the right type for the ZA storage. The docs say > > > https://sourceware.org/gdb/current/onlinedocs/gdb.html/AArch64-Features.html#AArch64-SME-registers-feature > > "- ZA is a register represented by a vector of svlxsvl bytes." > > but the code does this: > > /* Byte type. */ > element_type = tdesc_named_type (feature, "uint8"); > /* Vector of bytes. */ > element_type = tdesc_create_vector (feature, "sme_bv", element_type, > svl); > /* Vector of vector of bytes (Matrix). */ > element_type = tdesc_create_vector (feature, "sme_bvv", element_type, > svl); > > /* The following is the ZA register set. */ > tdesc_create_reg (feature, "za", regnum++, 1, nullptr, > std::pow (svl, 2) * 8, "sme_bvv"); > > which looks like it sets up the XML as a vector of a vector of bytes, > rather than a simple vector of bytes. (I did want to try to run > gdbserver to dump the actual XML it outputs, but wasn't able to > get a working setup for that.) > > Are the docs wrong, or the code, or are "vector of N*N bytes" and > "vector of N vectors of N bytes" the same type as far as GDB is > concerned, such that it doesn't matter which one the stub reports > in the XML ? > > thanks > -- PMM >