aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-tasks.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
commit7813437494ac39f3aef392d06ed5416e84fe386b (patch)
tree15290bf5b2bd9d23c59103a6a42b99adc0111d6d /gdb/ada-tasks.c
parent67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff)
downloadgdb-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/ada-tasks.c')
-rw-r--r--gdb/ada-tasks.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index 2663353..1288e16 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -431,9 +431,9 @@ read_fat_string_value (char *dest, struct value *val, int max_len)
bounds_fieldno = ada_get_field_index (type, "P_BOUNDS", 0);
bounds_type = TYPE_FIELD_TYPE (type, bounds_fieldno);
- if (TYPE_CODE (bounds_type) == TYPE_CODE_PTR)
+ if (bounds_type->code () == TYPE_CODE_PTR)
bounds_type = TYPE_TARGET_TYPE (bounds_type);
- if (TYPE_CODE (bounds_type) != TYPE_CODE_STRUCT)
+ if (bounds_type->code () != TYPE_CODE_STRUCT)
error (_("Unknown task name format. Aborting"));
upper_bound_fieldno = ada_get_field_index (bounds_type, "UB0", 0);
@@ -890,10 +890,10 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
struct type *eltype = NULL;
struct type *idxtype = NULL;
- if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
+ if (type->code () == TYPE_CODE_ARRAY)
eltype = check_typedef (TYPE_TARGET_TYPE (type));
if (eltype != NULL
- && TYPE_CODE (eltype) == TYPE_CODE_PTR)
+ && eltype->code () == TYPE_CODE_PTR)
idxtype = check_typedef (TYPE_INDEX_TYPE (type));
if (idxtype != NULL
&& !TYPE_LOW_BOUND_UNDEFINED (idxtype)
@@ -933,7 +933,7 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
/* Validate. */
struct type *type = check_typedef (SYMBOL_TYPE (sym));
- if (TYPE_CODE (type) == TYPE_CODE_PTR)
+ if (type->code () == TYPE_CODE_PTR)
{
data->known_tasks_element = type;
return;