diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2020-05-23 17:39:54 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2020-05-23 17:39:54 -0400 |
commit | ceacbf6edf2c72aaa16280205a9bfc8513e9ed27 (patch) | |
tree | 0e801f13f8c4c59f584af1e1cd5c9e49b225c3ab /gdb/ax-gdb.c | |
parent | 26f16254544873f4d7450f6fbbc8f34bf3d2e359 (diff) | |
download | binutils-ceacbf6edf2c72aaa16280205a9bfc8513e9ed27.zip binutils-ceacbf6edf2c72aaa16280205a9bfc8513e9ed27.tar.gz binutils-ceacbf6edf2c72aaa16280205a9bfc8513e9ed27.tar.bz2 |
gdb: remove TYPE_FIELD macro
Replace all uses of it by type::field.
Note that since type::field returns a reference to the field, some spots
are used to assign the whole field structure. See ctfread.c, function
attach_fields_to_type, for example. This is the same as was happening
with the macro, so I don't think it's a problem, but if anybody sees a
really nicer way to do this, now could be a good time to implement it.
gdb/ChangeLog:
* gdbtypes.h (TYPE_FIELD): Remove. Replace all uses with
type::field.
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r-- | gdb/ax-gdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index 4dcdc3b..54643dd 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -318,7 +318,7 @@ gen_trace_static_fields (struct agent_expr *ax, for (i = type->num_fields () - 1; i >= nbases; i--) { - if (field_is_static (&TYPE_FIELD (type, i))) + if (field_is_static (&type->field (i))) { gen_static_field (ax, &value, type, i); if (value.optimized_out) @@ -1456,7 +1456,7 @@ gen_struct_ref_recursive (struct agent_expr *ax, struct axs_value *value, "this") will have been generated already, which will be unnecessary but not harmful if the static field is being handled as a global. */ - if (field_is_static (&TYPE_FIELD (type, i))) + if (field_is_static (&type->field (i))) { gen_static_field (ax, value, type, i); if (value->optimized_out) @@ -1594,7 +1594,7 @@ gen_struct_elt_for_reference (struct agent_expr *ax, struct axs_value *value, if (t_field_name && strcmp (t_field_name, fieldname) == 0) { - if (field_is_static (&TYPE_FIELD (t, i))) + if (field_is_static (&t->field (i))) { gen_static_field (ax, value, t, i); if (value->optimized_out) |