}
}
-/* Helper function to check the validity of some bits of a value.
+/* See its definition in value.h. */
- If TYPE represents some aggregate type (e.g., a structure), return 1.
-
- Otherwise, any of the bytes starting at OFFSET and extending for
- TYPE_LENGTH(TYPE) bytes are invalid, print a message to STREAM and
- return 0. The checking is done using FUNCS.
-
- Otherwise, return 1. */
-
-static int
+int
valprint_check_validity (struct ui_file *stream,
struct type *type,
int embedded_offset,
for (i = 0; i < len; i++)
{
QUIT;
- if (val == TYPE_FIELD_BITPOS (type, i))
+ if (val == TYPE_FIELD_ENUMVAL (type, i))
{
break;
}
{
QUIT;
- if ((val & TYPE_FIELD_BITPOS (type, i)) != 0)
+ if ((val & TYPE_FIELD_ENUMVAL (type, i)) != 0)
{
if (!first)
fputs_filtered (" | ", stream);
first = 0;
- val &= ~TYPE_FIELD_BITPOS (type, i);
+ val &= ~TYPE_FIELD_ENUMVAL (type, i);
fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
}
}