X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fgdbtypes.c;h=2ee69899a935911819e4b49de35e8d21e9f16741;hb=0bc2354b811e913b39c288e74d7166eaa3639309;hp=4fe8d9a8e9cc3b439113427b0694676dd0f76023;hpb=0db49895f30daea6edcc57e4c5003fd02a747c2b;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 4fe8d9a8e9..2ee69899a9 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1155,6 +1155,9 @@ get_array_bounds (struct type *type, LONGEST *low_bound, LONGEST *high_bound) int discrete_position (struct type *type, LONGEST val, LONGEST *pos) { + if (type->code () == TYPE_CODE_RANGE) + type = TYPE_TARGET_TYPE (type); + if (type->code () == TYPE_CODE_ENUM) { int i;