[Dwarf-Discuss] How to interpret DW_AT_artificial tag?
paul.robinson at sony.com
Mon Feb 28 06:01:30 PST 2022
DW_AT_artificial generally means the item is compiler-generated, or otherwise has no explicit representation in the source.
An artificial member in a structure takes up however much space it takes, just like any other member, and the compiler should have generated the correct offsets for the other members of the structure. So, I’d expect the first non-artificial member to have offset 4 (or greater). Whether the consumer (in this case, your application) has to compensate really depends on what the application is doing.
From: Dwarf-Discuss <dwarf-discuss-bounces at lists.dwarfstd.org> On Behalf Of Ron Louzon via Dwarf-Discuss
Sent: Monday, February 28, 2022 8:50 AM
To: Dwarf-Discuss at lists.dwarfstd.org
Subject: [Dwarf-Discuss] How to interpret DW_AT_artificial tag?
I have an application which uses DwarfLib to extract type information from debug executable images. I have found in the DWARF data that some structure types have a "virtual" pointer added as their first member and this pointer's DIE contains the tag DW_AT_artificial=true. How does that pointer member affect the offsets of the members that follow it in the structure. Should this 4-byte pointer be ignored or will its size cause the other structure members to be pushed out in memory by 4 bytes?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dwarf-Discuss