mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
gdb: add type::is_prototyped / type::set_is_prototyped
Add the `is_prototyped` and `set_is_prototyped` methods on `struct type`, in order to remove the `TYPE_PROTOTYPED` macro. In this patch, the macro is changed to use the getter, so all the call sites of the macro that are used as a setter are changed to use the setter method directly. The next patch will remove the macro completely. gdb/ChangeLog: * gdbtypes.h (struct type) <is_prototyped, set_is_prototyped>: New methods. (TYPE_PROTOTYPED): Use type::is_prototyped, change all write call sites to use type::set_is_prototyped. Change-Id: I6ba285250fae413f7c1bf2ffcb5a2cedc8e743da
This commit is contained in:
@ -221,7 +221,7 @@ DEF_ENUM_FLAGS_TYPE (enum type_instance_flag_value, type_instance_flags);
|
||||
to coerce the args, or to just do the standard conversions. This
|
||||
is used with a short field. */
|
||||
|
||||
#define TYPE_PROTOTYPED(t) (TYPE_MAIN_TYPE (t)->flag_prototyped)
|
||||
#define TYPE_PROTOTYPED(t) ((t)->is_prototyped ())
|
||||
|
||||
/* * FIXME drow/2002-06-03: Only used for methods, but applies as well
|
||||
to functions. */
|
||||
@ -834,7 +834,7 @@ struct main_type
|
||||
unsigned int m_flag_nosign : 1;
|
||||
unsigned int m_flag_stub : 1;
|
||||
unsigned int m_flag_target_stub : 1;
|
||||
unsigned int flag_prototyped : 1;
|
||||
unsigned int m_flag_prototyped : 1;
|
||||
unsigned int flag_varargs : 1;
|
||||
unsigned int flag_vector : 1;
|
||||
unsigned int flag_stub_supported : 1;
|
||||
@ -1100,6 +1100,16 @@ struct type
|
||||
this->main_type->m_flag_target_stub = target_is_stub;
|
||||
}
|
||||
|
||||
bool is_prototyped () const
|
||||
{
|
||||
return this->main_type->m_flag_prototyped;
|
||||
}
|
||||
|
||||
void set_is_prototyped (bool is_prototyped)
|
||||
{
|
||||
this->main_type->m_flag_prototyped = is_prototyped;
|
||||
}
|
||||
|
||||
/* * 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;
|
||||
|
Reference in New Issue
Block a user