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
/
gdbtypes.c
diff --git
a/gdb/gdbtypes.c
b/gdb/gdbtypes.c
index 4fe8d9a8e9cc3b439113427b0694676dd0f76023..2ee69899a935911819e4b49de35e8d21e9f16741 100644
(file)
--- 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;
This page took
0.023675 seconds
and
4
git commands to generate.