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/p-valprint.c | |
parent | 26f16254544873f4d7450f6fbbc8f34bf3d2e359 (diff) | |
download | fsf-binutils-gdb-ceacbf6edf2c72aaa16280205a9bfc8513e9ed27.zip fsf-binutils-gdb-ceacbf6edf2c72aaa16280205a9bfc8513e9ed27.tar.gz fsf-binutils-gdb-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/p-valprint.c')
-rw-r--r-- | gdb/p-valprint.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 284dc85..cf902ac 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -553,7 +553,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream, { /* If requested, skip printing of static fields. */ if (!options->pascal_static_field_print - && field_is_static (&TYPE_FIELD (type, i))) + && field_is_static (&type->field (i))) continue; if (fields_seen) fprintf_filtered (stream, ", "); @@ -582,7 +582,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream, annotate_field_begin (TYPE_FIELD_TYPE (type, i)); - if (field_is_static (&TYPE_FIELD (type, i))) + if (field_is_static (&type->field (i))) { fputs_filtered ("static ", stream); fprintf_symbol_filtered (stream, @@ -597,7 +597,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream, fputs_filtered (" = ", stream); annotate_field_value (); - if (!field_is_static (&TYPE_FIELD (type, i)) + if (!field_is_static (&type->field (i)) && TYPE_FIELD_PACKED (type, i)) { struct value *v; @@ -636,7 +636,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream, fputs_styled ("<optimized out or zero length>", metadata_style.style (), stream); } - else if (field_is_static (&TYPE_FIELD (type, i))) + else if (field_is_static (&type->field (i))) { /* struct value *v = value_static_field (type, i); v4.17 specific. */ |