This is the mail archive of the archer@sourceware.org mailing list for the Archer 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] |
On Wed, 24 Dec 2008 11:11:12 +0100, Jonas Maebe wrote:struct { intptr_t refcount; intptr_t high; char data[1]; } dynarr_t;
A dynamic array variable is always a pointer which is either NULL (not
allocated) or which points to the "data" field of the above struct (so
the length and refcount are at negative offsets). The lower bound is
always 0, the current upper bound is stored in the "high" field.
Just be sure DW_TAG_variable's DW_AT_location gives the address of the pointer
to dynaddr_t, not the pointer value itself.
This GIT tag should work (although there is an update now). You should check
that TYPE_DYNAMIC is present in the sources.
Any hints on what I might be doing wrong?
Some basic hints can be given by `set debug target 1' to at least see which
addresses are being read while evaluating the array boundaries.
0x000000ce: TAG_subrange_type [7] AT_lower_bound( 0x00000000 ) AT_upper_bound( <0x5> 97 06 34 1c 06 ) AT_type( {0x000000f7} ( LONGINT ) )
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |