aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-varobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/c-varobj.c')
-rw-r--r--gdb/c-varobj.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gdb/c-varobj.c b/gdb/c-varobj.c
index 6cc76a1..a0b8493 100644
--- a/gdb/c-varobj.c
+++ b/gdb/c-varobj.c
@@ -307,12 +307,13 @@ c_describe_child (const struct varobj *parent, int index,
case TYPE_CODE_ARRAY:
if (cname)
*cname = int_string (index
- + TYPE_LOW_BOUND (type->index_type ()),
+ + type->index_type ()->bounds ()->low.const_val (),
10, 1, 0, 0);
if (cvalue && value)
{
- int real_index = index + TYPE_LOW_BOUND (type->index_type ());
+ int real_index
+ = index + type->index_type ()->bounds ()->low.const_val ();
try
{
@@ -327,12 +328,10 @@ c_describe_child (const struct varobj *parent, int index,
*ctype = get_target_type (type);
if (cfull_expression)
- *cfull_expression =
- string_printf ("(%s)[%s]", parent_expression.c_str (),
- int_string (index
- + TYPE_LOW_BOUND (type->index_type ()),
- 10, 1, 0, 0));
-
+ *cfull_expression = string_printf
+ ("(%s)[%s]", parent_expression.c_str (),
+ int_string (index + type->index_type ()->bounds ()->low.const_val (),
+ 10, 1, 0, 0));
break;