gramm
gramm

Reputation: 18824

DWARF parsing of DW_AT_data_member_location

I am implementing an interpreter of DWARF info for my company and I don't understand how to interpret the DW_AT_data_member_location when it has the following form:

DW_FORM = DW_FORM_block

Block value (ignoring length) = 0x23xx or 0x23xx01 , where "xx" is the actual offset relative to the enclosing structure.

I cannot find in the DWARF V3 specification where the "0x23/0x01" comes from. I have cross-checked with another DWARF parser and the value "0x23xx/0x23xx01" seems to be correct i.e. the actual block value.

Any information on this encoding / where in the spec it's described ?

Thanks

Upvotes: 0

Views: 677

Answers (1)

gramm
gramm

Reputation: 18824

Nevermind I got it, 0x23 is DW_OP_plus_uconst and is followed by a ULEB128 which is the offset. Not so clear in the spec imo.

Upvotes: 0

Related Questions