projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix bugs in 'val and 'pos with range types
[deliverable/binutils-gdb.git]
/
gdb
/
ada-lang.c
diff --git
a/gdb/ada-lang.c
b/gdb/ada-lang.c
index 7522917401cf60af5a517baf06d74ff09458ab64..5ffb2d6ac9594244561999c0820269579ec93b44 100644
(file)
--- a/
gdb/ada-lang.c
+++ b/
gdb/ada-lang.c
@@
-9148,6
+9148,9
@@
value_val_atr (struct type *type, struct value *arg)
if (!integer_type_p (value_type (arg)))
error (_("'VAL requires integral argument"));
+ if (type->code () == TYPE_CODE_RANGE)
+ type = TYPE_TARGET_TYPE (type);
+
if (type->code () == TYPE_CODE_ENUM)
{
long pos = value_as_long (arg);
This page took
0.024632 seconds
and
4
git commands to generate.