From 653223d3561b5976d12ade101113af9d08348b8c Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 14 Sep 2020 11:07:56 -0400 Subject: gdb: add type::is_unsigned / type::set_is_unsigned Add the `is_unsigned` and `set_is_unsigned` methods on `struct type`, in order to remove the `TYPE_UNSIGNED` macro. In this patch, the `TYPE_UNSIGNED` macro is changed to use `type::is_unsigned`, so all the call sites that are used to set this property on a type are changed to use the new method. The next patch will remove the macro completely. gdb/ChangeLog: * gdbtypes.h (struct type) : New methods. (TYPE_UNSIGNED): Use type::is_unsigned. Change all write call sites to use type::set_is_unsigned. Change-Id: Ib09ddce84eda160a801a8f288cccf61c8ef136bc --- gdb/stabsread.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gdb/stabsread.c') diff --git a/gdb/stabsread.c b/gdb/stabsread.c index d2ff54a..b30b075 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -3616,7 +3616,7 @@ read_enum_type (const char **pp, struct type *type, type->set_code (TYPE_CODE_ENUM); TYPE_STUB (type) = 0; if (unsigned_enum) - TYPE_UNSIGNED (type) = 1; + type->set_is_unsigned (true); type->set_num_fields (nsyms); type->set_fields ((struct field *) @@ -3731,7 +3731,8 @@ read_sun_builtin_type (const char **pp, int typenums[2], struct objfile *objfile struct type *type = init_type (objfile, TYPE_CODE_VOID, TARGET_CHAR_BIT, NULL); if (unsigned_type) - TYPE_UNSIGNED (type) = 1; + type->set_is_unsigned (true); + return type; } -- cgit v1.1