aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:08:04 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:08:04 -0400
commit3f46044c09fc5a4982f4ad99aff5b7af60d3f186 (patch)
tree64ad871acb6768f7e42794fbc58d34c41ba605f6 /gdb
parent9baccff6ae259e74ba1f172008a377dbe2107318 (diff)
downloadgdb-3f46044c09fc5a4982f4ad99aff5b7af60d3f186.zip
gdb-3f46044c09fc5a4982f4ad99aff5b7af60d3f186.tar.gz
gdb-3f46044c09fc5a4982f4ad99aff5b7af60d3f186.tar.bz2
gdb: remove TYPE_STUB_SUPPORTED
gdb/ChangeLog: * gdbtypes.h (TYPE_STUB_SUPPORTED): Remove, replace all uses with type::stub_is_supported. Change-Id: I69dbc32a619455605b7f934a701bc36bd664b7c0
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbtypes.c2
-rw-r--r--gdb/gdbtypes.h14
3 files changed, 12 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 881429d..1bfe02b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2020-09-14 Simon Marchi <simon.marchi@efficios.com>
+ * gdbtypes.h (TYPE_STUB_SUPPORTED): Remove, replace all
+ uses with type::stub_is_supported.
+
+2020-09-14 Simon Marchi <simon.marchi@efficios.com>
+
* gdbtypes.h (struct type) <stub_is_supported, set_stub_is_supported>: New methods.
(TYPE_STUB_SUPPORTED): Use type::stub_is_supported, change all write call sites to
use type::set_stub_is_supported.
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 89f428f..bc8a6f2 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 6f1bdfd..ed1b30a 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. */