diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-08-30 11:49:49 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-09-30 22:05:57 -0400 |
commit | 33d16dd987d16fe1eb289853e5a444192bb31d9e (patch) | |
tree | 06c5ec20fad9309ab4dace3b6c659fa518d272af /gdb/c-varobj.c | |
parent | d3fd12dfc52cf4cbb910830e3ff60dca111f7468 (diff) | |
download | binutils-33d16dd987d16fe1eb289853e5a444192bb31d9e.zip binutils-33d16dd987d16fe1eb289853e5a444192bb31d9e.tar.gz binutils-33d16dd987d16fe1eb289853e5a444192bb31d9e.tar.bz2 |
gdb: remove TYPE_FIELD_NAME and FIELD_NAME macros
Remove the `TYPE_FIELD_NAME` and `FIELD_NAME` macros, changing all the
call sites to use field::name directly.
Change-Id: I6900ae4e1ffab1396e24fb3298e94bf123826ca6
Diffstat (limited to 'gdb/c-varobj.c')
-rw-r--r-- | gdb/c-varobj.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/c-varobj.c b/gdb/c-varobj.c index 8056c1c..11af9ec 100644 --- a/gdb/c-varobj.c +++ b/gdb/c-varobj.c @@ -165,7 +165,7 @@ c_is_path_expr_parent (const struct varobj *var) const char *field_name; gdb_assert (var->index < parent_type->num_fields ()); - field_name = TYPE_FIELD_NAME (parent_type, var->index); + field_name = parent_type->field (var->index).name (); return !(field_name == NULL || *field_name == '\0'); } } @@ -341,7 +341,7 @@ c_describe_child (const struct varobj *parent, int index, /* If the type is anonymous and the field has no name, set an appropriate name. */ - field_name = TYPE_FIELD_NAME (type, index); + field_name = type->field (index).name (); if (field_name == NULL || *field_name == '\0') { if (cname) @@ -761,7 +761,7 @@ cplus_describe_child (const struct varobj *parent, int index, /* If the type is anonymous and the field has no name, set an appropriate name. */ - field_name = TYPE_FIELD_NAME (type, type_index); + field_name = type->field (type_index).name (); if (field_name == NULL || *field_name == '\0') { if (cname) @@ -780,7 +780,7 @@ cplus_describe_child (const struct varobj *parent, int index, else { if (cname) - *cname = TYPE_FIELD_NAME (type, type_index); + *cname = type->field (type_index).name (); if (cfull_expression) *cfull_expression @@ -798,7 +798,7 @@ cplus_describe_child (const struct varobj *parent, int index, { /* This is a baseclass. */ if (cname) - *cname = TYPE_FIELD_NAME (type, index); + *cname = type->field (index).name (); if (cvalue && value) *cvalue = value_cast (type->field (index).type (), value); @@ -827,7 +827,7 @@ cplus_describe_child (const struct varobj *parent, int index, 'class' keyword. See PR mi/11912 */ *cfull_expression = string_printf ("(%s(class %s%s) %s)", ptr, - TYPE_FIELD_NAME (type, index), + type->field (index).name (), ptr, parent_expression); } |