aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-valprint.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-09-26 16:38:02 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-10-29 16:44:45 -0400
commit970db5186051c051d9c5bd1f7ed404902b96fa80 (patch)
treeec3f149b291e22c532b6b61367fd9b2abcdff0e4 /gdb/ada-valprint.c
parentb610c04548a39dbce6d51c33d7a8125e59066939 (diff)
downloadgdb-970db5186051c051d9c5bd1f7ed404902b96fa80.zip
gdb-970db5186051c051d9c5bd1f7ed404902b96fa80.tar.gz
gdb-970db5186051c051d9c5bd1f7ed404902b96fa80.tar.bz2
gdb: remove TYPE_FIELD_ENUMVAL
Remove TYPE_FIELD_ENUMVAL, replace with type::field + field::loc_enumval. Change-Id: I2ada73e4635aad3363ce2eb22c1dc52698ee2072
Diffstat (limited to 'gdb/ada-valprint.c')
-rw-r--r--gdb/ada-valprint.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 04f1c7d..6813af5 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -94,7 +94,7 @@ print_optional_low_bound (struct ui_file *stream, struct type *type,
case TYPE_CODE_ENUM:
if (low_bound == 0)
return 0;
- low_bound = TYPE_FIELD_ENUMVAL (index_type, low_bound);
+ low_bound = index_type->field (low_bound).loc_enumval ();
break;
case TYPE_CODE_UNDEF:
index_type = NULL;
@@ -381,7 +381,7 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
len = type->num_fields ();
for (i = 0; i < len; i++)
{
- if (TYPE_FIELD_ENUMVAL (type, i) == val)
+ if (type->field (i).loc_enumval () == val)
{
break;
}
@@ -835,7 +835,7 @@ ada_val_print_enum (struct value *value, struct ui_file *stream, int recurse,
for (i = 0; i < len; i++)
{
QUIT;
- if (val == TYPE_FIELD_ENUMVAL (type, i))
+ if (val == type->field (i).loc_enumval ())
break;
}