From: Simon Marchi Date: Mon, 14 Sep 2020 15:08:00 +0000 (-0400) Subject: gdb: remove TYPE_TARGET_STUB X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d21839680655c071a811de1d7b41f8d7de4fc462;p=binutils-gdb.git gdb: remove TYPE_TARGET_STUB gdb/ChangeLog: * gdbtypes.h (TYPE_TARGET_STUB): Remove, replace all uses with type::target_is_stub. Change-Id: I3e7dadcb485d991af68a1e93693e3895b0e755d5 --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 644d70038d0..376bb9dade0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-09-14 Simon Marchi + + * gdbtypes.h (TYPE_TARGET_STUB): Remove, replace all + uses with type::target_is_stub. + 2020-09-14 Simon Marchi * gdbtypes.h (struct type) : diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 6dc073fb5ae..91f3ed82b8c 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 c6c25183609..e03564c7584 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;