This is the mail archive of the
dwarf2@corp.sgi.com
mailing list for the dwarf2 project.
Re: PROPOSAL: DW_AT_byte_size & DW_AT_bit_* as DW_FORM_ref*; allow on
- To: eager at eagercon dot com
- Subject: Re: PROPOSAL: DW_AT_byte_size & DW_AT_bit_* as DW_FORM_ref*; allow on
- From: todd dot allen at ccur dot com (Todd Allen)
- Date: Fri, 2 Mar 2001 15:15:22 -0700 (MST)
- Cc: dwarf2 at corp dot sgi dot com (dwarf2)
- Reply-To: todd dot allen at ccur dot com (Todd Allen)
>
> I believe that this can be described completely within in the current
> standard, without requiring any changes.
>
> We do not need to have every object able to specify a size and offset.
> This information is localized to two places: the structure description
> and the base types. There seems to be no need to scatter it everywhere.
>
My example didn't convey the full scope of the problem, then. I'll
explain further.
Those two places do not allow the description a record object which is
located at bit offset 3 of address ..., and has a bit size of 5.
The object is not a component, and the record type isn't a base type.
The issue is that Ada permits many more objects within a program to have
bit offsets and bit sizes than just base type scalars or components of
records.
Allowing DW_AT_byte_size, DW_AT_bit_size, and DW_AT_bit_offset on objects
isn't strictly necessary. Merely allowing them on all types would
suffice. I concede that. But it will cause DWARF bloat. Allowing them
on objects reduces the bloat.
>
> Also, I believe that a location expression would address your concerns.
>
DW_AT_bit_offset does not permit a location expression. If it did, then
technically allowing references wouldn't be necessary. But if a reference
is allowed, it would permit debuggers to give better descriptions of the
location, since it could use the name or description of the referenced
entity.
--
Todd Allen
Concurrent Computer Corporation