gdb: make get_dyn_prop a method of struct type
Move get_dyn_prop, currently a free function, to be a method on struct type. gdb/ChangeLog: * gdbtypes.h (struct type) <get_dyn_prop>: New method. (get_dyn_prop): Remove. Update all users to use type::dyn_prop. * gdbtypes.c (get_dyn_prop): Rename to... (type::dyn_prop): ... this.
This commit is contained in:
parent
d11a9fabab
commit
24e99c6c3c
6 changed files with 32 additions and 27 deletions
|
@ -776,13 +776,13 @@ print_record_field_types (struct type *type, struct type *outer_type,
|
|||
struct ui_file *stream, int show, int level,
|
||||
const struct type_print_options *flags)
|
||||
{
|
||||
struct dynamic_prop *prop = get_dyn_prop (DYN_PROP_VARIANT_PARTS, type);
|
||||
struct dynamic_prop *prop = type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
||||
if (prop != nullptr)
|
||||
{
|
||||
if (prop->kind == PROP_TYPE)
|
||||
{
|
||||
type = prop->data.original_type;
|
||||
prop = get_dyn_prop (DYN_PROP_VARIANT_PARTS, type);
|
||||
prop = type->dyn_prop (DYN_PROP_VARIANT_PARTS);
|
||||
}
|
||||
gdb_assert (prop->kind == PROP_VARIANT_PARTS);
|
||||
print_record_field_types_dynamic (*prop->data.variant_parts,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue