/* Target description support for GDB.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2017 Free Software Foundation, Inc.
Contributed by CodeSourcery.
typedef struct tdesc_type
{
- /* The name of this type. */
- char *name;
+ /* The name of this type. If this type is a built-in type, this is
+ a pointer to a constant string. Otherwise, it's a
+ malloc-allocated string (and thus must be freed). */
+ const char *name;
/* Identify the kind of this type. */
enum tdesc_type_kind kind;
break;
}
- xfree (type->name);
+ xfree ((char *) type->name);
xfree (type);
}