[Dwarf-discuss] regarding listing class members

John DelSignore jdelsign@etnus.com
Wed Mar 7 17:19:19 GMT 2007


For readelf output, the number in angle brackets to the far left represents the nesting level of the DIE. Other dwarf dumpers might represent nesting differently. In your example, this text:

  <1><5b>: Abbrev Number: 2 (DW_TAG_structure_type)

means nesting level <1>, DIE number <5b>. And this text:

  <2><68>: Abbrev Number: 3 (DW_TAG_member)

means nesting level <2>, DIE number <68>.

The nesting level represents the parent-child relationship the tree, so since DIE <68> follows DIE <5b>, and the nesting level of DIE <68> is 1 greater than DIE <5b>, DIE <68> is a child of DIE <5b>, thus DIE <68> is owned by DIE <5b>.

Cheers, John D.


gireesh subramaniam wrote:
> hello all,
>    i read the information in section 2.3 of the DWARF document,but 
> however contrary to the notion of  the members of a class forming a 
> graph ,i am not able to find the exact link between the class ,the 
> supposed owner,and the members.Here i have included one part of the 
> dwarfdump for asource file
> 
> in this file:
> CLASS name:base
> member        :int i
> 
> i have pasted the .debug_info sections of the dwarfdump corresponding to 
> this.
>   
> 
> <1><5b>: Abbrev Number: 2 (DW_TAG_structure_type)
>      DW_AT_sibling     : <f3>   
>      DW_AT_name        : base   
>      DW_AT_byte_size   : 4   
>      DW_AT_decl_file   : 1   
>      DW_AT_decl_line   : 3   
>  <2><68>: Abbrev Number: 3 (DW_TAG_member)
>      DW_AT_name        : i   
>      DW_AT_decl_file   : 1   
>      DW_AT_decl_line   : 5   
>      DW_AT_type        : <f3>   
>      DW_AT_data_member_location: 2 byte block: 23 0     
> (DW_OP_plus_uconst: 0)
>      DW_AT_accessibility: 3    (private)
> 
> 
> 
> Before i conclude,i would like to thank everyone those who have taken 
> the pain to reply,also i am able to see that the data members of the 
> class are in consecutive locations in the info section,so to list all 
> the members should i use only this piece of information or is there any 
> other efficient way to achieve this.
> 
> regards and thanks.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> dwarf-discuss mailing list
> dwarf-discuss at lists.dwarfstd.org
> http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org




More information about the Dwarf-discuss mailing list