+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.
+
2020-09-14 Simon Marchi <simon.marchi@efficios.com>
* gdbtypes.h (TYPE_VECTOR): Remove, replace all
type->set_is_stub (true);
}
else
- TYPE_STUB_SUPPORTED (type) = 1;
+ type->set_stub_is_supported (true);
if (die_is_declaration (die, cu))
type->set_is_stub (true);
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) (TYPE_MAIN_TYPE (t)->flag_stub_supported)
+#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. */
unsigned int m_flag_prototyped : 1;
unsigned int m_flag_varargs : 1;
unsigned int m_flag_vector : 1;
- unsigned int flag_stub_supported : 1;
+ unsigned int m_flag_stub_supported : 1;
unsigned int flag_gnu_ifunc : 1;
unsigned int flag_fixed_instance : 1;
unsigned int flag_objfile_owned : 1;
this->main_type->m_flag_vector = is_vector;
}
+ bool stub_is_supported () const
+ {
+ return this->main_type->m_flag_stub_supported;
+ }
+
+ void set_stub_is_supported (bool stub_is_supported)
+ {
+ this->main_type->m_flag_stub_supported = stub_is_supported;
+ }
+
/* * Return the dynamic property of the requested KIND from this type's
list of dynamic properties. */
dynamic_prop *dyn_prop (dynamic_prop_node_kind kind) const;