-
Notifications
You must be signed in to change notification settings - Fork 15k
Open
Labels
Description
LLDB does not display SVE predicate variables (of type svbool_t) correctly:
- Even with
DW_AT_bit_strideset correctly forsvbool_t(see clang DWARF SVE predicate type does not have DW_AT_bit_stride #159285), LLDB reads 1 byte for an element of the predicate vector. - LLDB always reads 64 bits for a predicate vector implying vector length 512 bits.
For code
svbool_t pred16 = svwhilelt_b16_u32 (0u, 5u);For VL = 512 bits:
(lldb) p/t *(uint64_t*)&pred16
(uint64_t) 0b0000000000000000000000000000000000000000000000000000000101010101
(lldb) p pred16
(bool __attribute__((ext_vector_type(8)))) (true, true, false, false, false, false, false, false)
For VL = 256 bits:
(lldb) p/t *(uint64_t*)&pred16
(uint64_t) 0b1010101010101010000001111011010000000000000000000000000101010101
(lldb) p pred16
(bool __attribute__((ext_vector_type(8)))) (true, true, false, false, true, true, true, true)
Notice that LLDB treats 1st byte 01010101 as true and then 2nd byte 00000001 as true while this was supposed to be several elements.
In the second example (for VL = 256 bits) LLDB reads memory beyond 32 bits of the predicate vector.