diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2020-09-14 11:08:08 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-09-14 11:08:08 -0400 |
commit | 04f5bab24ba93562d5d14b6f26efbd407dbccaaf (patch) | |
tree | 74287d416e8e9620361408c3f7e3c7b2bf627b1c | |
parent | db558e34b065552e67646879bd70867318a8ff5b (diff) | |
download | fsf-binutils-gdb-04f5bab24ba93562d5d14b6f26efbd407dbccaaf.zip fsf-binutils-gdb-04f5bab24ba93562d5d14b6f26efbd407dbccaaf.tar.gz fsf-binutils-gdb-04f5bab24ba93562d5d14b6f26efbd407dbccaaf.tar.bz2 |
gdb: remove TYPE_ENDIANITY_NOT_DEFAULT
gdb/ChangeLog:
* gdbtypes.h (TYPE_ENDIANITY_NOT_DEFAULT): Remove, replace all
uses with type::endianity_is_not_default.
Change-Id: I61956093c8ce6703299e913746ba91313108a0f2
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 6 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 10 |
3 files changed, 12 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9d7661d..0ccbb89 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-09-14 Simon Marchi <simon.marchi@polymtl.ca> + + * gdbtypes.h (TYPE_ENDIANITY_NOT_DEFAULT): Remove, replace all + uses with type::endianity_is_not_default. + 2020-09-14 Simon Marchi <simon.marchi@efficios.com> * gdbtypes.h (struct type) <endianity_is_not_default, diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index ed548dd..5a3f18e 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -3705,7 +3705,7 @@ enum bfd_endian type_byte_order (const struct type *type) { bfd_endian byteorder = gdbarch_byte_order (get_type_arch (type)); - if (TYPE_ENDIANITY_NOT_DEFAULT (type)) + if (type->endianity_is_not_default ()) { if (byteorder == BFD_ENDIAN_BIG) return BFD_ENDIAN_LITTLE; @@ -3991,7 +3991,7 @@ check_types_equal (struct type *type1, struct type *type2, || TYPE_LENGTH (type1) != TYPE_LENGTH (type2) || type1->is_unsigned () != type2->is_unsigned () || type1->has_no_signedness () != type2->has_no_signedness () - || TYPE_ENDIANITY_NOT_DEFAULT (type1) != TYPE_ENDIANITY_NOT_DEFAULT (type2) + || type1->endianity_is_not_default () != type2->endianity_is_not_default () || type1->has_varargs () != type2->has_varargs () || type1->is_vector () != type2->is_vector () || TYPE_NOTTEXT (type1) != TYPE_NOTTEXT (type2) @@ -5072,7 +5072,7 @@ recursive_dump_type (struct type *type, int spaces) { puts_filtered (" TYPE_NOSIGN"); } - if (TYPE_ENDIANITY_NOT_DEFAULT (type)) + if (type->endianity_is_not_default ()) { puts_filtered (" TYPE_ENDIANITY_NOT_DEFAULT"); } diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index beff6a7..ee9fc79 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -210,12 +210,6 @@ enum type_instance_flag_value : unsigned DEF_ENUM_FLAGS_TYPE (enum type_instance_flag_value, type_instance_flags); -/* * A compiler may supply dwarf instrumentation - that indicates the desired endian interpretation of the variable - differs from the native endian representation. */ - -#define TYPE_ENDIANITY_NOT_DEFAULT(t) ((t)->endianity_is_not_default ()) - /* * Not textual. By default, GDB treats all single byte integers as characters (or elements of strings) unless this flag is set. */ @@ -1149,6 +1143,10 @@ struct type this->main_type->m_flag_fixed_instance = is_fixed_instance; } + /* A compiler may supply dwarf instrumentation that indicates the desired + endian interpretation of the variable differs from the native endian + representation. */ + bool endianity_is_not_default () const { return this->main_type->m_flag_endianity_not_default; |