diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-09-14 11:07:56 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-09-14 11:07:56 -0400 |
commit | 653223d3561b5976d12ade101113af9d08348b8c (patch) | |
tree | d91acbd802d4b2500c76e83ac6306471367154d2 /gdb/target-descriptions.c | |
parent | 55ea94da360700cd3d96cacb7957904692913c45 (diff) | |
download | gdb-653223d3561b5976d12ade101113af9d08348b8c.zip gdb-653223d3561b5976d12ade101113af9d08348b8c.tar.gz gdb-653223d3561b5976d12ade101113af9d08348b8c.tar.bz2 |
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) <is_unsigned, set_is_unsigned>: New
methods.
(TYPE_UNSIGNED): Use type::is_unsigned. Change all write call
sites to use type::set_is_unsigned.
Change-Id: Ib09ddce84eda160a801a8f288cccf61c8ef136bc
Diffstat (limited to 'gdb/target-descriptions.c')
-rw-r--r-- | gdb/target-descriptions.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index 6778b93..611cb9c 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -289,7 +289,8 @@ make_gdb_type (struct gdbarch *gdbarch, struct tdesc_type *ttype) m_type = arch_type (m_gdbarch, TYPE_CODE_ENUM, e->size * TARGET_CHAR_BIT, e->name.c_str ()); - TYPE_UNSIGNED (m_type) = 1; + m_type->set_is_unsigned (true); + for (const tdesc_type_field &f : e->fields) { struct field *fld |