diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-08-30 11:49:49 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-09-30 22:05:57 -0400 |
commit | 33d16dd987d16fe1eb289853e5a444192bb31d9e (patch) | |
tree | 06c5ec20fad9309ab4dace3b6c659fa518d272af /gdb/valprint.c | |
parent | d3fd12dfc52cf4cbb910830e3ff60dca111f7468 (diff) | |
download | gdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.zip gdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.tar.gz gdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.tar.bz2 |
gdb: remove TYPE_FIELD_NAME and FIELD_NAME macros
Remove the `TYPE_FIELD_NAME` and `FIELD_NAME` macros, changing all the
call sites to use field::name directly.
Change-Id: I6900ae4e1ffab1396e24fb3298e94bf123826ca6
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r-- | gdb/valprint.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c index 324055d..c6ea0d8 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -615,7 +615,7 @@ generic_val_print_enum_1 (struct type *type, LONGEST val, } if (i < len) { - fputs_styled (TYPE_FIELD_NAME (type, i), variable_name_style.style (), + fputs_styled (type->field (i).name (), variable_name_style.style (), stream); } else if (type->is_flag_enum ()) @@ -646,7 +646,7 @@ generic_val_print_enum_1 (struct type *type, LONGEST val, fputs_filtered (" | ", stream); val &= ~TYPE_FIELD_ENUMVAL (type, i); - fputs_styled (TYPE_FIELD_NAME (type, i), + fputs_styled (type->field (i).name (), variable_name_style.style (), stream); } } @@ -1203,7 +1203,7 @@ val_print_type_code_flags (struct type *type, struct value *original_value, fputs_filtered ("[", stream); for (field = 0; field < nfields; field++) { - if (TYPE_FIELD_NAME (type, field)[0] != '\0') + if (type->field (field).name ()[0] != '\0') { struct type *field_type = type->field (field).type (); @@ -1218,7 +1218,7 @@ val_print_type_code_flags (struct type *type, struct value *original_value, fprintf_filtered (stream, " %ps", styled_string (variable_name_style.style (), - TYPE_FIELD_NAME (type, field))); + type->field (field).name ())); } else { @@ -1229,7 +1229,7 @@ val_print_type_code_flags (struct type *type, struct value *original_value, field_val &= ((ULONGEST) 1 << field_len) - 1; fprintf_filtered (stream, " %ps=", styled_string (variable_name_style.style (), - TYPE_FIELD_NAME (type, field))); + type->field (field).name ())); if (field_type->code () == TYPE_CODE_ENUM) generic_val_print_enum_1 (field_type, field_val, stream); else |