aboutsummaryrefslogtreecommitdiff
path: root/gdb/parse.c
diff options
context:
space:
mode:
authorSanimir Agovic <sanimir.agovic@intel.com>2013-10-08 15:04:49 +0100
committerSanimir Agovic <sanimir.agovic@intel.com>2014-04-11 13:43:47 +0100
commit729efb13174d6522fba4aa7ab273e7f25a253c47 (patch)
tree4911deb3c526d0619e6a3c628820b8f9c201c609 /gdb/parse.c
parent0c9c3474029f5250b428274eaf63f7a349c6fc5f (diff)
downloadgdb-729efb13174d6522fba4aa7ab273e7f25a253c47.zip
gdb-729efb13174d6522fba4aa7ab273e7f25a253c47.tar.gz
gdb-729efb13174d6522fba4aa7ab273e7f25a253c47.tar.bz2
vla: introduce new bound type abstraction adapt uses
The rational behind this patch is to get started to implement the feature described in dwarf4 standard (2.19) Static and Dynamic Values of Attributes. It adds new BOUND_PROP to store either a constant, exprloc, or reference to describe an upper-/lower bound of a subrange. Other than that no new features are introduced. * dwarf2read.c (read_subrange_type): Use struct bound_prop for declaring high/low bounds and change uses accordingly. Call create_range_type instead of create_static_range_type. * gdbtypes.c (create_range_type): New function. (create_range_type): Convert bounds into struct bound_prop and pass them to create_range_type. * gdbtypes.h (struct bound_prop): New struct. (create_range_type): New function prototype. (struct range_bounds): Use struct bound_prop instead of LONGEST for high/low bounds. Remove low_undefined/high_undefined and adapt all uses. (TYPE_LOW_BOUND,TYPE_HIGH_BOUND): Adapt macros to refer to the static part of the bound. * parse.c (follow_types): Set high bound kind to BOUND_UNDEFINED.
Diffstat (limited to 'gdb/parse.c')
-rw-r--r--gdb/parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/parse.c b/gdb/parse.c
index b0da2ef..105d0cd 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -1692,7 +1692,8 @@ follow_types (struct type *follow_type)
lookup_array_range_type (follow_type,
0, array_size >= 0 ? array_size - 1 : 0);
if (array_size < 0)
- TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (follow_type) = 1;
+ TYPE_HIGH_BOUND_KIND (TYPE_INDEX_TYPE (follow_type))
+ = PROP_UNDEFINED;
break;
case tp_function:
/* FIXME-type-allocation: need a way to free this type when we are