diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-07-30 12:07:39 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-09-21 10:53:55 -0400 |
commit | 8a50fdcefc44c40d5c4b978f19c22ddfbeb29139 (patch) | |
tree | 423aae459c642ed5542af312098835612df0ec84 /gdb/linux-tdep.c | |
parent | 0242db993f8ad0a0de16dafc4ebd35bb6190c833 (diff) | |
download | gdb-8a50fdcefc44c40d5c4b978f19c22ddfbeb29139.zip gdb-8a50fdcefc44c40d5c4b978f19c22ddfbeb29139.tar.gz gdb-8a50fdcefc44c40d5c4b978f19c22ddfbeb29139.tar.bz2 |
gdb: add type::target_type / type::set_target_type
Add the `target_type` and `set_target_type` methods on `struct type`, in order
to remove the `TYPE_TARGET_TYPE` macro. In this patch, the macro is changed to
use the getter, so all the call sites of the macro that are used as a setter
are changed to use the setter method directly. The next patch will remove the
macro completely.
Change-Id: I85ce24d847763badd34fdee3e14b8c8c14cb3161
Diffstat (limited to 'gdb/linux-tdep.c')
-rw-r--r-- | gdb/linux-tdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index 5fe6be1..590dd35 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -294,20 +294,20 @@ linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch, /* __pid_t */ pid_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF, TYPE_LENGTH (int_type) * TARGET_CHAR_BIT, "__pid_t"); - TYPE_TARGET_TYPE (pid_type) = int_type; + pid_type->set_target_type (int_type); pid_type->set_target_is_stub (true); /* __uid_t */ uid_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF, TYPE_LENGTH (uint_type) * TARGET_CHAR_BIT, "__uid_t"); - TYPE_TARGET_TYPE (uid_type) = uint_type; + uid_type->set_target_type (uint_type); uid_type->set_target_is_stub (true); /* __clock_t */ clock_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF, TYPE_LENGTH (long_type) * TARGET_CHAR_BIT, "__clock_t"); - TYPE_TARGET_TYPE (clock_type) = long_type; + clock_type->set_target_type (long_type); clock_type->set_target_is_stub (true); /* _sifields */ |