On Wed, Oct 08, 2025 at 11:25:28AM +0200, Jakub Jelinek wrote:
> > ...
> > Just to confirm, you don't want to add DW_AT_bit_stride to DW_TAG_array_type
> > entry and *instead* add DW_AT_bit_size 1 in the base type? And if GDB
> > still doesn't work, then fix it on the GDB side?
> 
> I want both, DW_AT_bit_size 1 on the DW_AT_type referenced DIE (made up
> anyway, it isn't reusing the normal bool DW_TAG_base_type) and
> DW_AT_bit_stride 1 on the DW_TAG_array_type with DW_AT_GNU_vector flag.
> And only if the vector type is the packed boolean vector, not for other
> cases.
> 
>       Jakub
> 

Question about best way to locate the referenced DIE: I could perhaps
use modified_type_die() with element_type, but it would be call again
shortly after when a reference is added to the DW_TAG_array_type DIE
(from within add_type_attribute()).

Would it be OK to change add_type_attribute() to return type_die that
if finds? I could then use the returned value to add DW_AT_bit_size 1
when I process svbool_t type.

Thanks,
Yury

Reply via email to