aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:07:59 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:07:59 -0400
commit8f53807e5c957fb947fb8d61fc2583e2dcbd6f06 (patch)
tree649228e0a30a2999240fd9de4691f72a259dc536 /gdb/linux-tdep.c
parente46d3488de137cd5a01377513ff49e32595456af (diff)
downloadfsf-binutils-gdb-8f53807e5c957fb947fb8d61fc2583e2dcbd6f06.zip
fsf-binutils-gdb-8f53807e5c957fb947fb8d61fc2583e2dcbd6f06.tar.gz
fsf-binutils-gdb-8f53807e5c957fb947fb8d61fc2583e2dcbd6f06.tar.bz2
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) <target_is_stub, set_target_is_stub>: New methods. (TYPE_TARGET_STUB): Use type::is_stub, change all write call sites to use type::set_target_is_stub. Change-Id: I9c71a89adc7ae8d018db9ee156f41c623be0484a
Diffstat (limited to 'gdb/linux-tdep.c')
-rw-r--r--gdb/linux-tdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 0b2b032..a0d954a 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -266,20 +266,20 @@ linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch,
pid_type = arch_type (gdbarch, TYPE_CODE_TYPEDEF,
TYPE_LENGTH (int_type) * TARGET_CHAR_BIT, "__pid_t");
TYPE_TARGET_TYPE (pid_type) = int_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 (uint_type) * TARGET_CHAR_BIT, "__uid_t");
TYPE_TARGET_TYPE (uid_type) = uint_type;
- TYPE_TARGET_STUB (uid_type) = 1;
+ 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;
- TYPE_TARGET_STUB (clock_type) = 1;
+ clock_type->set_target_is_stub (true);
/* _sifields */
sifields_type = arch_composite_type (gdbarch, NULL, TYPE_CODE_UNION);