This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: python pretty print gdb script error on map


>>>>> "Jonathan" == Jonathan Wakely <jwakely.gcc@gmail.com> writes:

Jonathan> I think this is due to something in gcc, not libstdc++ or the
Jonathan> printers.py script, maybe a change in debug info.
Jonathan> I've CC'd some gdb devs, to find out what causes the error:
Jonathan> RuntimeError: Attempt to dereference a generic pointer.

This seems to be a GCC 4.5 bug.

>From readelf -wi:

 <2><157b>: Abbrev Number: 37 (DW_TAG_member)
    <157c>   DW_AT_name        : (indirect string, offset: 0x2d32): _M_right	
    <1580>   DW_AT_decl_file   : 4	
    <1581>   DW_AT_decl_line   : 95	
    <1582>   DW_AT_type        : <0x1554>	
    <1586>   DW_AT_data_member_location: 2 byte block: 23 c 	(DW_OP_plus_uconst: 12)


The type of that is:

 <2><1554>: Abbrev Number: 3 (DW_TAG_typedef)
    <1555>   DW_AT_name        : (indirect string, offset: 0xbe): _Base_ptr	
    <1559>   DW_AT_decl_file   : 4	
    <155a>   DW_AT_decl_line   : 89	
    <155b>   DW_AT_type        : <0x15fd>	

And that points to:

 <1><15fd>: Abbrev Number: 60 (DW_TAG_pointer_type)
    <15fe>   DW_AT_byte_size   : 4	


So, GCC is telling us that _M_right is a void*.


With trunk I see correct debuginfo.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]