{
int len, i;
- if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+ if (type->code () == TYPE_CODE_STRUCT)
{
len = TYPE_NFIELDS (type);
i = TYPE_N_BASECLASSES (type);
struct type *elttype = check_typedef (TYPE_TARGET_TYPE (type));
int want_space = 0;
- if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
+ if (elttype->code () == TYPE_CODE_FUNC)
{
/* Try to print what function it points to. */
print_function_pointer_address (options, gdbarch, addr, stream);
pointed to, unless pointer is null. */
if (TYPE_LENGTH (elttype) == 1
- && TYPE_CODE (elttype) == TYPE_CODE_INT
+ && elttype->code () == TYPE_CODE_INT
&& (options->format == 0 || options->format == 's')
&& addr != 0)
{
fputs_filtered (paddress (gdbarch, addr), stream);
fprintf_filtered (stream, "] : ");
- if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
+ if (elttype->code () != TYPE_CODE_UNDEF)
{
struct value *deref_val =
value_at (TYPE_TARGET_TYPE (type), unpack_pointer (type, valaddr));
{
/* For an array of chars, print with string syntax. */
if (TYPE_LENGTH (type) == 1 &&
- ((TYPE_CODE (type) == TYPE_CODE_INT)
+ ((type->code () == TYPE_CODE_INT)
|| ((current_language->la_language == language_m2)
- && (TYPE_CODE (type) == TYPE_CODE_CHAR)))
+ && (type->code () == TYPE_CODE_CHAR)))
&& (options->format == 0 || options->format == 's'))
val_print_string (type, NULL, value_address (val), len+1, stream,
options);
const CORE_ADDR address = value_address (val);
struct type *type = check_typedef (value_type (val));
- switch (TYPE_CODE (type))
+ switch (type->code ())
{
case TYPE_CODE_ARRAY:
if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
len = TYPE_LENGTH (type) / TYPE_LENGTH (elttype);
/* For an array of chars, print with string syntax. */
if (TYPE_LENGTH (elttype) == 1 &&
- ((TYPE_CODE (elttype) == TYPE_CODE_INT)
+ ((elttype->code () == TYPE_CODE_INT)
|| ((current_language->la_language == language_m2)
- && (TYPE_CODE (elttype) == TYPE_CODE_CHAR)))
+ && (elttype->code () == TYPE_CODE_CHAR)))
&& (options->format == 0 || options->format == 's'))
{
/* If requested, look for the first null char and only print