[Dwarf-Discuss] Complete/Incomplete struct clarification

Christophe LYON christophe.lyon at st.com
Tue Nov 25 01:44:57 PST 2008


Hello,

I would like some clarification on the use of DW_AT_declaration to 
describe incomplete types. Indeed, the Dwarf standard says that for 
incomplete structs, there should be no DW_AT_byte_size info in addition 
to the DW_AT_declaration flag.

Why is there this additional constraint on DW_AT_byte_size?

If the compiler generates DW_AT_declaration even for "complete" type 
declaration, is this a compiler bug?

I have discovered the hard way that GDB simply ignores struct members 
description if the structure_type node has FW_AT_declaration, even if it 
also has DW_AT_byte_size (see scan_partial_symbols(), which has a more 
restrictive condition than add_partial_symbol()). Is this an 
inconsistency in GDB that should be fixed also?

Thanks for your feedback.

Regards,

Christophe.



More information about the Dwarf-Discuss mailing list