clang `const void*` producing: WARNING: broken DIE: DIE DW_TAG_const_type, size=1, has_children=False
I think this is coming from pyelftools. Just filing a bug for now in case others come across this, too.
👋 Nick. This is an odd issue report - any reproducer?
32b x86 linux kernel build.
Indeed via llvm-dwarfdump I see:
0x00005202: NULL
0x00005203: DW_TAG_pointer_type
DW_AT_type (0x00005208 "const void")
0x00005208: DW_TAG_const_type
0x00005209: DW_TAG_pointer_type
DW_AT_type (0x0000520e "kioctx_table")
so perhaps a bug in clang producing empty type tags.
oh, 0x00005203 is a pointer type, it points to a const void. void has an empty DW_TAG_const_type.
const void is pretty funny. "I don't know what this type is, but you'd better not modify it!"
Saw that too. void* is reported as a pointer to nothing. pyelftools itself parses that happily. Where exactly is the warning?