vla: support for DW_AT_count
This patch adds support for DW_AT_count as requested in the code review: https://sourceware.org/ml/gdb-patches/2013-11/msg00200.html gdb/ChangeLog: * dwarf2read.c (read_subrange_type): Convert DW_AT_count to a dynamic property and store it as the high bound and flag the range accordingly. * gdbtypes.c (resolve_dynamic_bounds): If range is flagged as RANGE_UPPER_BOUND_IS_COUNT assign low + high - 1 as the new high bound. * gdbtypes.h (enum range_flags): New enum. (struct range_bounds): Add flags member.
This commit is contained in:
parent
1d42e4c4d8
commit
c451ebe5dd
4 changed files with 28 additions and 8 deletions
|
@ -1698,6 +1698,10 @@ resolve_dynamic_bounds (struct type *type, CORE_ADDR addr)
|
|||
{
|
||||
high_bound.kind = PROP_CONST;
|
||||
high_bound.data.const_val = value;
|
||||
|
||||
if (TYPE_RANGE_DATA (range_type)->flag_upper_bound_is_count)
|
||||
high_bound.data.const_val
|
||||
= low_bound.data.const_val + high_bound.data.const_val - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue