From 3f46044c09fc5a4982f4ad99aff5b7af60d3f186 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 14 Sep 2020 11:08:04 -0400 Subject: [PATCH] gdb: remove TYPE_STUB_SUPPORTED gdb/ChangeLog: * gdbtypes.h (TYPE_STUB_SUPPORTED): Remove, replace all uses with type::stub_is_supported. Change-Id: I69dbc32a619455605b7f934a701bc36bd664b7c0 --- gdb/ChangeLog | 5 +++++ gdb/gdbtypes.c | 2 +- gdb/gdbtypes.h | 14 ++++++-------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 881429df6f1..1bfe02b504f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-09-14 Simon Marchi + + * gdbtypes.h (TYPE_STUB_SUPPORTED): Remove, replace all + uses with type::stub_is_supported. + 2020-09-14 Simon Marchi * gdbtypes.h (struct type) : New methods. diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 89f428faf21..bc8a6f29a4e 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -5103,7 +5103,7 @@ recursive_dump_type (struct type *type, int spaces) { puts_filtered (" TYPE_FIXED_INSTANCE"); } - if (TYPE_STUB_SUPPORTED (type)) + if (type->stub_is_supported ()) { puts_filtered (" TYPE_STUB_SUPPORTED"); } diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 6f1bdfd49d6..ed1b30a753d 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -228,13 +228,6 @@ DEF_ENUM_FLAGS_TYPE (enum type_instance_flag_value, type_instance_flags); #define TYPE_FIXED_INSTANCE(t) (TYPE_MAIN_TYPE (t)->flag_fixed_instance) -/* * This debug target supports TYPE_STUB(t). In the unsupported case - we have to rely on NFIELDS to be zero etc., see TYPE_IS_OPAQUE(). - TYPE_STUB(t) with !TYPE_STUB_SUPPORTED(t) may exist if we only - guessed the TYPE_STUB(t) value (see dwarfread.c). */ - -#define TYPE_STUB_SUPPORTED(t) ((t)->stub_is_supported ()) - /* * Not textual. By default, GDB treats all single byte integers as characters (or elements of strings) unless this flag is set. */ @@ -1125,6 +1118,11 @@ struct type this->main_type->m_flag_vector = is_vector; } + /* This debug target supports TYPE_STUB(t). In the unsupported case + we have to rely on NFIELDS to be zero etc., see TYPE_IS_OPAQUE(). + TYPE_STUB(t) with !TYPE_STUB_SUPPORTED(t) may exist if we only + guessed the TYPE_STUB(t) value (see dwarfread.c). */ + bool stub_is_supported () const { return this->main_type->m_flag_stub_supported; @@ -1882,7 +1880,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); && ((thistype)->num_fields () == 0) \ && (!HAVE_CPLUS_STRUCT (thistype) \ || TYPE_NFN_FIELDS (thistype) == 0) \ - && ((thistype)->is_stub () || !TYPE_STUB_SUPPORTED (thistype))) + && ((thistype)->is_stub () || !(thistype)->stub_is_supported ())) /* * A helper macro that returns the name of a type or "unnamed type" if the type has no name. */ -- 2.30.2