Convert static_kind into loc_kind enum.
* gdbtypes.h (enum field_loc_kind): New. (union field_location): New field dwarf_block. (struct field): Rename static_kind as loc_kind. (FIELD_STATIC_KIND): Rename to ... (FIELD_LOC_KIND): ... here. (TYPE_FIELD_STATIC_KIND): Rename to ... (TYPE_FIELD_LOC_KIND): ... here and use there now new FIELD_LOC_KIND. (TYPE_FIELD_STATIC_HAS_ADDR): Remove. (TYPE_FIELD_STATIC): Remove. (TYPE_FIELD_BITPOS): Reformat. (SET_FIELD_BITPOS): New. (FIELD_PHYSADDR): Rename to ... (FIELD_STATIC_PHYSADDR): ... here. (TYPE_FIELD_STATIC_PHYSADDR): Follow the FIELD_PHYSADDR rename. (SET_FIELD_PHYSADDR): Use new FIELD_LOC_KIND. (FIELD_PHYSNAME): Rename to ... (FIELD_STATIC_PHYSNAME): ... here. (TYPE_FIELD_STATIC_PHYSNAME): Follow the FIELD_PHYSNAME rename. (SET_FIELD_PHYSNAME): Use new FIELD_LOC_KIND. (FIELD_DWARF_BLOCK, TYPE_FIELD_DWARF_BLOCK, SET_FIELD_DWARF_BLOCK): New. (field_is_static): New declaration. * gdbtypes.c (field_is_static): New function. (copy_type_recursive): Update throughout. * amd64-tdep.c, c-typeprint.c, coffread.c, cp-valprint.c, dwarf2read.c, eval.c, jv-typeprint.c, jv-valprint.c, mdebugread.c, p-typeprint.c, p-valprint.c, valops.c, value.c, varobj.c: Update throughout.
This commit is contained in:
parent
aea274d3a7
commit
d6a843b594
17 changed files with 150 additions and 86 deletions
|
@ -192,7 +192,8 @@ cp_print_value_fields (struct type *type, struct type *real_type,
|
|||
for (i = n_baseclasses; i < len; i++)
|
||||
{
|
||||
/* If requested, skip printing of static fields. */
|
||||
if (!static_field_print && TYPE_FIELD_STATIC (type, i))
|
||||
if (!static_field_print
|
||||
&& field_is_static (&TYPE_FIELD (type, i)))
|
||||
continue;
|
||||
|
||||
if (fields_seen)
|
||||
|
@ -225,7 +226,7 @@ cp_print_value_fields (struct type *type, struct type *real_type,
|
|||
fputs_filtered ("\"( ptr \"", stream);
|
||||
else
|
||||
fputs_filtered ("\"( nodef \"", stream);
|
||||
if (TYPE_FIELD_STATIC (type, i))
|
||||
if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
fputs_filtered ("static ", stream);
|
||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
||||
current_language->la_language,
|
||||
|
@ -240,7 +241,7 @@ cp_print_value_fields (struct type *type, struct type *real_type,
|
|||
{
|
||||
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
||||
|
||||
if (TYPE_FIELD_STATIC (type, i))
|
||||
if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
fputs_filtered ("static ", stream);
|
||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
||||
current_language->la_language,
|
||||
|
@ -252,7 +253,8 @@ cp_print_value_fields (struct type *type, struct type *real_type,
|
|||
annotate_field_value ();
|
||||
}
|
||||
|
||||
if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
|
||||
if (!field_is_static (&TYPE_FIELD (type, i))
|
||||
&& TYPE_FIELD_PACKED (type, i))
|
||||
{
|
||||
struct value *v;
|
||||
|
||||
|
@ -278,7 +280,7 @@ cp_print_value_fields (struct type *type, struct type *real_type,
|
|||
{
|
||||
fputs_filtered ("<optimized out or zero length>", stream);
|
||||
}
|
||||
else if (TYPE_FIELD_STATIC (type, i))
|
||||
else if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
{
|
||||
struct value *v = value_static_field (type, i);
|
||||
if (v == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue