diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:46:38 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:46:38 -0400 |
commit | 7813437494ac39f3aef392d06ed5416e84fe386b (patch) | |
tree | 15290bf5b2bd9d23c59103a6a42b99adc0111d6d /gdb/f-valprint.c | |
parent | 67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff) | |
download | gdb-7813437494ac39f3aef392d06ed5416e84fe386b.zip gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.gz gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.bz2 |
gdb: remove TYPE_CODE macro
Remove TYPE_CODE, changing all the call sites to use type::code
directly. This is quite a big diff, but this was mostly done using sed
and coccinelle. A few call sites were done by hand.
gdb/ChangeLog:
* gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
type::code instead.
Diffstat (limited to 'gdb/f-valprint.c')
-rw-r--r-- | gdb/f-valprint.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index 36328c7..76981fa 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -85,8 +85,8 @@ f77_get_dynamic_length_of_aggregate (struct type *type) This function also works for strings which behave very similarly to arrays. */ - if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_ARRAY - || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_STRING) + if (TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_ARRAY + || TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_STRING) f77_get_dynamic_length_of_aggregate (TYPE_TARGET_TYPE (type)); /* Recursion ends here, start setting up lengths. */ @@ -223,7 +223,7 @@ f_value_print_innner (struct value *val, struct ui_file *stream, int recurse, const gdb_byte *valaddr = value_contents_for_printing (val); const CORE_ADDR address = value_address (val); - switch (TYPE_CODE (type)) + switch (type->code ()) { case TYPE_CODE_STRING: f77_get_dynamic_length_of_aggregate (type); @@ -232,7 +232,7 @@ f_value_print_innner (struct value *val, struct ui_file *stream, int recurse, break; case TYPE_CODE_ARRAY: - if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_CHAR) + if (TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_CHAR) { fprintf_filtered (stream, "("); f77_print_array (type, valaddr, 0, @@ -263,7 +263,7 @@ f_value_print_innner (struct value *val, struct ui_file *stream, int recurse, addr = unpack_pointer (type, valaddr); elttype = check_typedef (TYPE_TARGET_TYPE (type)); - if (TYPE_CODE (elttype) == TYPE_CODE_FUNC) + if (elttype->code () == TYPE_CODE_FUNC) { /* Try to print what function it points to. */ print_function_pointer_address (options, gdbarch, addr, stream); @@ -282,7 +282,7 @@ f_value_print_innner (struct value *val, struct ui_file *stream, int recurse, /* For a pointer to char or unsigned char, also print the string pointed to, unless pointer is null. */ if (TYPE_LENGTH (elttype) == 1 - && TYPE_CODE (elttype) == TYPE_CODE_INT + && elttype->code () == TYPE_CODE_INT && (options->format == 0 || options->format == 's') && addr != 0) { @@ -320,7 +320,7 @@ f_value_print_innner (struct value *val, struct ui_file *stream, int recurse, struct type *field_type = check_typedef (TYPE_FIELD_TYPE (type, index)); - if (TYPE_CODE (field_type) != TYPE_CODE_FUNC) + if (field_type->code () != TYPE_CODE_FUNC) { const char *field_name; |