/* Support for printing Go types for GDB, the GNU debugger.
- Copyright (C) 2012-2013 Free Software Foundation, Inc.
+ Copyright (C) 2012-2020 Free Software Foundation, Inc.
This file is part of GDB.
{
/* Borrowed from c-typeprint.c. */
if (show > 0)
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
/* Print the type of "abc" as "string", not char[4]. */
- if (TYPE_CODE (type) == TYPE_CODE_ARRAY
- && TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CHAR)
+ if (type->code () == TYPE_CODE_ARRAY
+ && TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_CHAR)
{
fputs_filtered ("string", stream);
return;