AnsweredAssumed Answered

Elfdump utility - doubt about DW_AT_type array inside a C structure

Question asked by lucas_embraer on Feb 3, 2014
Latest reply on Feb 19, 2014 by CraigG

Dear all,

 

Analysing the result of my elfdump dump, I realized that when a structure member is an array, the dump reports as below:

 

00058774:   |  |--- DW_TAG_member
00058775:   |  |       DW_AT_name = "_5_Context_1"
00058782:   |  |       DW_AT_accessibility = 0x01
00058783:   |  |       DW_AT_type = 0x00005473
00058787:   |  |       DW_AT_data_member_location = [0x2] DW_OP_plus_uconst(0x23)

 

Where:

_5_Context_1 is my array variable and it is a member of a structure.

 

The DW_AT_type = 0x00005473 is the type of _5_Context_1 (which I know is "MyType" for example).

 

When I look at  DW_AT_type = 0x00005473 in the dump file, I got that:

 

0005a4d4:   |--- DW_TAG_array_type
0005a4d5:   |  |    DW_AT_sibling = 0x00005473
0005a4d9:   |  |    DW_AT_type = 0x00002af3

 

So, 0x00005473  is type of  0x00002af3.

 

However, when a find the  0x00002af3 in the dump file, I got another type, I mean, not "MyType type"

 

I figured out that it happens only in arrays.

 

Does anybody know a litlle bit better?

 

Lucas

Outcomes