http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49459
Paul Koning <pkoning at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |4.1.2 --- Comment #2 from Paul Koning <pkoning at gcc dot gnu.org> 2011-10-19 17:00:09 UTC --- I see the same issue as far back as 4.1.2. As I mentioned, it works in 3.3.3. I compared readelf outputs. The difference is that in 3.3.3 the typedef points to a DW_TAG_base_type entry, which supplies the size of 1 -- but also makes the type look like "unsigned char" instead of enum. That at least doesn't break the debugger but it isn't ideal either. <1><6d>: Abbrev Number: 6 (DW_TAG_variable) <6e> DW_AT_name : foo <72> DW_AT_decl_file : 1 <73> DW_AT_decl_line : 4 <74> DW_AT_type : <0x3a> <78> DW_AT_external : 1 <79> DW_AT_location : 5 byte block: 3 1 0 0 0 (DW_OP_addr: 1) <1><3a>: Abbrev Number: 4 (DW_TAG_typedef) <3b> DW_AT_name : e1 <3e> DW_AT_decl_file : 1 <3f> DW_AT_decl_line : 1 <40> DW_AT_type : <0x44> <1><44>: Abbrev Number: 5 (DW_TAG_base_type) <45> DW_AT_name : (indirect string, offset: 0x0): unsigned char <49> DW_AT_byte_size : 1 <4a> DW_AT_encoding : 8 (unsigned char)