Closed
Description
I have a test program that does &x
and &x as *const i32
. The only difference in the generated DWARF is the name of the pointer type:
<1><e1>: Abbrev Number: 4 (DW_TAG_pointer_type)
<e2> DW_AT_type : <0x77>
<e6> DW_AT_name : (indirect string, offset: 0xa0): *const i32
...
<1><4bc>: Abbrev Number: 4 (DW_TAG_pointer_type)
<4bd> DW_AT_type : <0x77>
<4c1> DW_AT_name : (indirect string, offset: 0x38c): &i32
I think it would be better if the DWARF represented the difference via tags or attributes, and not just the type name. One way would be to emit references as DW_TAG_reference_type
, and save DW_TAG_pointer_type
for raw pointers.