This is the mail archive of the dwarf2@corp.sgi.com mailing list for the dwarf2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 991108.11 Fortran 90 arrays - a couple of questions



> I believe that the value of DW_AT_stride is the number of bytes between
> array elements.  

Right, that's certainly my understanding too.

> The object referred to by the DW_OP_push_object_address is the address of
> the object described by the current DIE.  I don't believe that it has the
> interpretation you suggest, that it dereferences the top of the evaluation
> stack in some fashion.  Perhaps Ron can explain the parenthetical comment
> in the description.

Exactly : it represents the address of the object in question. It has
been generated by the debugger by some technique which we don't
specify.

That technique _could_ be evaluating the address of a variable
described in the DWARF, but it could _also_ be something like asking
the user for an address, evaluating some function in the user
process and using the result as the address, or reading /dev/random.

> The proposal states that the object "may correspond to an independent
> variable or be a component of an array or record/struct/class [whose address
> is known only to the debugger as a result of earlier expression evaluation
> steps]".

The comment is intended to make clear that the debugger can generate
the "object_address" value in whatever way it feels like. 

The intent is that push_object_address used many times in the same
location expression will push the same value each time, that value
being whatever the debugger thinks of as the "address of the object".
(So if it _does_ get the value from /dev/random it better save that
value once so that it can reproduce the same value each time
push_object_address is invoked within the same location expression).

-- Jim 

James Cownie	<jcownie@etnus.com>
Etnus, Inc.     +44 117 9071438
http://www.etnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]