summaryrefslogtreecommitdiff
path: root/gdb/valarith.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/valarith.c')
-rw-r--r--gdb/valarith.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 59f67d3ed6f..b192ff95cd5 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -1557,7 +1557,7 @@ value_bit_index (struct type *type, const gdb_byte *valaddr, int index)
LONGEST low_bound, high_bound;
LONGEST word;
unsigned rel_index;
- struct type *range = TYPE_FIELD_TYPE (type, 0);
+ struct type *range = TYPE_INDEX_TYPE (type);
if (get_discrete_bounds (range, &low_bound, &high_bound) < 0)
return -2;
if (index < low_bound || index > high_bound)