From 8f53807e5c957fb947fb8d61fc2583e2dcbd6f06 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 14 Sep 2020 11:07:59 -0400 Subject: gdb: add type::target_is_stub / type::set_target_is_stub Add the `target_is_stub` and `set_target_is_stub` methods on `struct type`, in order to remove the `TYPE_TARGET_STUB` 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. gdb/ChangeLog: * gdbtypes.h (struct type) : New methods. (TYPE_TARGET_STUB): Use type::is_stub, change all write call sites to use type::set_target_is_stub. Change-Id: I9c71a89adc7ae8d018db9ee156f41c623be0484a --- gdb/fbsd-tdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/fbsd-tdep.c') diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c index ca397fa..a462e4d 100644 --- a/gdb/fbsd-tdep.c +++ b/gdb/fbsd-tdep.c @@ -1643,14 +1643,14 @@ fbsd_get_siginfo_type (struct gdbarch *gdbarch) pid_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF, TYPE_LENGTH (int32_type) * TARGET_CHAR_BIT, "__pid_t"); TYPE_TARGET_TYPE (pid_type) = int32_type; - TYPE_TARGET_STUB (pid_type) = 1; + pid_type->set_target_is_stub (true); /* __uid_t */ uid_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF, TYPE_LENGTH (uint32_type) * TARGET_CHAR_BIT, "__uid_t"); TYPE_TARGET_TYPE (uid_type) = uint32_type; - TYPE_TARGET_STUB (uid_type) = 1; + pid_type->set_target_is_stub (true); /* _reason */ reason_type = arch_composite_type (gdbarch, NULL, TYPE_CODE_UNION); -- cgit v1.1