* [repost] Support DW_AT_count inside DW_TAG_subrange_type
@ 2005-07-14 8:41 Vladimir Prus
2005-07-14 14:11 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Prus @ 2005-07-14 8:41 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 660 bytes --]
Hello,
I've got not reply to the following message, which was posted on 31/05/2005.
Any change this patch will go in?
Original message below:
Hi,
the DWARF standard says that the DW_TAG_subrage_type tag can contain either
DW_AT_upper_bound or use DW_AT_count to specify upper bound relatively to
lower bound. The version 6.3 of gdb, and the current CVS, support only
DW_TAG_upper_bound.
The attached patch adds support for DW_AT_count.
The changelog entry could be:
2005-05-31 Vladimur Prus <ghost@cs.msu.su>
dwarf2read.c (read_subrange_type): If no DW_AT_upper_bound attribute
is present, try using DW_AT_count
Comments?
- Volodya
[-- Attachment #2: DW_AT_count.diff --]
[-- Type: text/x-diff, Size: 629 bytes --]
--- dwarf2read.c.orig 2004-10-16 04:41:00.000000000 +0400
+++ dwarf2read.c 2005-05-31 17:38:57.000000000 +0400
@@ -4794,6 +4794,17 @@
else
high = dwarf2_get_attr_constant_value (attr, 1);
}
+ else
+ {
+ /* Alternatively, the high boundary can be specified with the
+ DW_AT_count attribute, which must be added to the low value.
+ */
+ attr = dwarf2_attr (die, DW_AT_count, cu);
+ if (attr)
+ {
+ high = dwarf2_get_attr_constant_value(attr, 0) + low - 1;
+ }
+ }
range_type = create_range_type (NULL, base_type, low, high);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [repost] Support DW_AT_count inside DW_TAG_subrange_type
2005-07-14 8:41 [repost] Support DW_AT_count inside DW_TAG_subrange_type Vladimir Prus
@ 2005-07-14 14:11 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-07-14 14:11 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches, Elena Zannoni
On Thu, Jul 14, 2005 at 12:40:48PM +0400, Vladimir Prus wrote:
>
> Hello,
> I've got not reply to the following message, which was posted on 31/05/2005.
> Any change this patch will go in?
Elena has to review dwarf2 reader patches; I've copied her directly.
>
> Original message below:
>
> Hi,
> the DWARF standard says that the DW_TAG_subrage_type tag can contain either
> DW_AT_upper_bound or use DW_AT_count to specify upper bound relatively to
> lower bound. The version 6.3 of gdb, and the current CVS, support only
> DW_TAG_upper_bound.
>
> The attached patch adds support for DW_AT_count.
>
> The changelog entry could be:
> 2005-05-31 Vladimur Prus <ghost@cs.msu.su>
>
> dwarf2read.c (read_subrange_type): If no DW_AT_upper_bound attribute
> is present, try using DW_AT_count
>
>
>
> Comments?
>
> - Volodya
>
> --- dwarf2read.c.orig 2004-10-16 04:41:00.000000000 +0400
> +++ dwarf2read.c 2005-05-31 17:38:57.000000000 +0400
> @@ -4794,6 +4794,17 @@
> else
> high = dwarf2_get_attr_constant_value (attr, 1);
> }
> + else
> + {
> + /* Alternatively, the high boundary can be specified with the
> + DW_AT_count attribute, which must be added to the low value.
> + */
> + attr = dwarf2_attr (die, DW_AT_count, cu);
> + if (attr)
> + {
> + high = dwarf2_get_attr_constant_value(attr, 0) + low - 1;
> + }
> + }
>
> range_type = create_range_type (NULL, base_type, low, high);
>
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-14 14:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-14 8:41 [repost] Support DW_AT_count inside DW_TAG_subrange_type Vladimir Prus
2005-07-14 14:11 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox