aboutsummaryrefslogtreecommitdiff
path: root/gdb/iq2000-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-06-08 15:26:04 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-06-08 15:26:04 -0400
commit5d14b6e5d6525ce462c30501644922a10f8682eb (patch)
tree0f1ce729b9393dc161bbcc4fc70f5b7b0a3ff335 /gdb/iq2000-tdep.c
parent3d967001ecd3b325fc39d7f53ebf7054d1ecd503 (diff)
downloadgdb-5d14b6e5d6525ce462c30501644922a10f8682eb.zip
gdb-5d14b6e5d6525ce462c30501644922a10f8682eb.tar.gz
gdb-5d14b6e5d6525ce462c30501644922a10f8682eb.tar.bz2
gdb: add field::type / field::set_type
Add the `type` and `set_type` methods on `struct field`, in order to remoremove the `FIELD_TYPE` macro. In this patch, the `FIELD_TYPE` macro is changed to use `field::type`, so all the call sites that are useused to set the field's type are changed to use `field::set_type`. The next patch will remove `FIELD_TYPE` completely. Note that because of the name clash between the existing field named `type` and the new method, I renamed the field `m_type`. It is not private per-se, because we can't make `struct field` a non-POD yet, but it should be considered private anyway (not accessed outside `struct field`). gdb/ChangeLog: * gdbtypes.h (struct field) <type, set_type>: New methods. Rename `type` field to... <m_type>: ... this. Change references throughout to use type or set_type methods. (FIELD_TYPE): Use field::type. Change call sites that modify the field's type to use field::set_type instead. Change-Id: Ie21f866e3b7f8a51ea49b722d07d272a724459a0
Diffstat (limited to 'gdb/iq2000-tdep.c')
-rw-r--r--gdb/iq2000-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index b35b45e..cd53ec7 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -607,7 +607,7 @@ iq2000_pass_8bytetype_by_address (struct type *type)
if (type->num_fields () != 1)
return 1;
/* Get field type. */
- ftype = type->field (0).type;
+ ftype = type->field (0).type ();
/* The field type must have size 8, otherwise pass by address. */
if (TYPE_LENGTH (ftype) != 8)
return 1;