aboutsummaryrefslogtreecommitdiff
path: root/gdb/netbsd-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-07-30 12:07:39 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 10:53:55 -0400
commit8a50fdcefc44c40d5c4b978f19c22ddfbeb29139 (patch)
tree423aae459c642ed5542af312098835612df0ec84 /gdb/netbsd-tdep.c
parent0242db993f8ad0a0de16dafc4ebd35bb6190c833 (diff)
downloadbinutils-8a50fdcefc44c40d5c4b978f19c22ddfbeb29139.zip
binutils-8a50fdcefc44c40d5c4b978f19c22ddfbeb29139.tar.gz
binutils-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/netbsd-tdep.c')
-rw-r--r--gdb/netbsd-tdep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/netbsd-tdep.c b/gdb/netbsd-tdep.c
index 2e30aaf..49382ea 100644
--- a/gdb/netbsd-tdep.c
+++ b/gdb/netbsd-tdep.c
@@ -416,23 +416,23 @@ nbsd_get_siginfo_type (struct gdbarch *gdbarch)
/* pid_t */
type *pid_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF,
TYPE_LENGTH (int32_type) * char_bits, "pid_t");
- TYPE_TARGET_TYPE (pid_type) = int32_type;
+ pid_type->set_target_type (int32_type);
/* uid_t */
type *uid_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF,
TYPE_LENGTH (uint32_type) * char_bits, "uid_t");
- TYPE_TARGET_TYPE (uid_type) = uint32_type;
+ uid_type->set_target_type (uint32_type);
/* clock_t */
type *clock_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF,
TYPE_LENGTH (int_type) * char_bits, "clock_t");
- TYPE_TARGET_TYPE (clock_type) = int_type;
+ clock_type->set_target_type (int_type);
/* lwpid_t */
type *lwpid_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF,
TYPE_LENGTH (int32_type) * char_bits,
"lwpid_t");
- TYPE_TARGET_TYPE (lwpid_type) = int32_type;
+ lwpid_type->set_target_type (int32_type);
/* union sigval */
type *sigval_type = arch_composite_type (gdbarch, NULL, TYPE_CODE_UNION);