diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-09-14 11:08:00 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-09-14 11:08:00 -0400 |
commit | d21839680655c071a811de1d7b41f8d7de4fc462 (patch) | |
tree | 34cc504449b41d7f957eb5922d317a774655f055 | |
parent | 8f53807e5c957fb947fb8d61fc2583e2dcbd6f06 (diff) | |
download | fsf-binutils-gdb-d21839680655c071a811de1d7b41f8d7de4fc462.zip fsf-binutils-gdb-d21839680655c071a811de1d7b41f8d7de4fc462.tar.gz fsf-binutils-gdb-d21839680655c071a811de1d7b41f8d7de4fc462.tar.bz2 |
gdb: remove TYPE_TARGET_STUB
gdb/ChangeLog:
* gdbtypes.h (TYPE_TARGET_STUB): Remove, replace all
uses with type::target_is_stub.
Change-Id: I3e7dadcb485d991af68a1e93693e3895b0e755d5
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 6 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 14 |
3 files changed, 14 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 644d700..376bb9d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2020-09-14 Simon Marchi <simon.marchi@efficios.com> + * gdbtypes.h (TYPE_TARGET_STUB): Remove, replace all + uses with type::target_is_stub. + +2020-09-14 Simon Marchi <simon.marchi@efficios.com> + * gdbtypes.h (struct type) <target_is_stub, set_target_is_stub>: New methods. (TYPE_TARGET_STUB): Use type::is_stub, change all write call diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 6dc073f..91f3ed8 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -2864,11 +2864,11 @@ check_typedef (struct type *type) } } - if (TYPE_TARGET_STUB (type)) + if (type->target_is_stub ()) { struct type *target_type = check_typedef (TYPE_TARGET_TYPE (type)); - if (target_type->is_stub () || TYPE_TARGET_STUB (target_type)) + if (target_type->is_stub () || target_type->target_is_stub ()) { /* Nothing we can do. */ } @@ -5080,7 +5080,7 @@ recursive_dump_type (struct type *type, int spaces) { puts_filtered (" TYPE_STUB"); } - if (TYPE_TARGET_STUB (type)) + if (type->target_is_stub ()) { puts_filtered (" TYPE_TARGET_STUB"); } diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index c6c2518..e03564c 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -216,14 +216,6 @@ DEF_ENUM_FLAGS_TYPE (enum type_instance_flag_value, type_instance_flags); #define TYPE_ENDIANITY_NOT_DEFAULT(t) (TYPE_MAIN_TYPE (t)->flag_endianity_not_default) -/* * The target type of this type is a stub type, and this type needs - to be updated if it gets un-stubbed in check_typedef. Used for - arrays and ranges, in which TYPE_LENGTH of the array/range gets set - based on the TYPE_LENGTH of the target type. Also, set for - TYPE_CODE_TYPEDEF. */ - -#define TYPE_TARGET_STUB(t) ((t)->target_is_stub ()) - /* * This is a function type which appears to have a prototype. We need this for function calls in order to tell us if it's necessary to coerce the args, or to just do the standard conversions. This @@ -1092,6 +1084,12 @@ struct type this->main_type->m_flag_stub = is_stub; } + /* The target type of this type is a stub type, and this type needs + to be updated if it gets un-stubbed in check_typedef. Used for + arrays and ranges, in which TYPE_LENGTH of the array/range gets set + based on the TYPE_LENGTH of the target type. Also, set for + TYPE_CODE_TYPEDEF. */ + bool target_is_stub () const { return this->main_type->m_flag_target_stub; |