Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / target-descriptions.c
index 1410c02e12d5d0a88fdd038bf0481df15f5aab46..0eec6be18bb2619338724c489f7dbb91159b1d8a 100644 (file)
@@ -1,6 +1,6 @@
 /* Target description support for GDB.
 
-   Copyright (C) 2006-2013 Free Software Foundation, Inc.
+   Copyright (C) 2006-2015 Free Software Foundation, Inc.
 
    Contributed by CodeSourcery.
 
@@ -31,7 +31,6 @@
 #include "xml-tdesc.h"
 #include "osabi.h"
 
-#include "gdb_assert.h"
 #include "gdb_obstack.h"
 #include "hashtab.h"
 #include "inferior.h"
@@ -102,38 +101,40 @@ typedef struct tdesc_type_flag
 } tdesc_type_flag;
 DEF_VEC_O(tdesc_type_flag);
 
+enum tdesc_type_kind
+{
+  /* Predefined types.  */
+  TDESC_TYPE_INT8,
+  TDESC_TYPE_INT16,
+  TDESC_TYPE_INT32,
+  TDESC_TYPE_INT64,
+  TDESC_TYPE_INT128,
+  TDESC_TYPE_UINT8,
+  TDESC_TYPE_UINT16,
+  TDESC_TYPE_UINT32,
+  TDESC_TYPE_UINT64,
+  TDESC_TYPE_UINT128,
+  TDESC_TYPE_CODE_PTR,
+  TDESC_TYPE_DATA_PTR,
+  TDESC_TYPE_IEEE_SINGLE,
+  TDESC_TYPE_IEEE_DOUBLE,
+  TDESC_TYPE_ARM_FPA_EXT,
+  TDESC_TYPE_I387_EXT,
+
+  /* Types defined by a target feature.  */
+  TDESC_TYPE_VECTOR,
+  TDESC_TYPE_STRUCT,
+  TDESC_TYPE_UNION,
+  TDESC_TYPE_FLAGS
+};
+
 typedef struct tdesc_type
 {
   /* The name of this type.  */
   char *name;
 
   /* Identify the kind of this type.  */
-  enum
-  {
-    /* Predefined types.  */
-    TDESC_TYPE_INT8,
-    TDESC_TYPE_INT16,
-    TDESC_TYPE_INT32,
-    TDESC_TYPE_INT64,
-    TDESC_TYPE_INT128,
-    TDESC_TYPE_UINT8,
-    TDESC_TYPE_UINT16,
-    TDESC_TYPE_UINT32,
-    TDESC_TYPE_UINT64,
-    TDESC_TYPE_UINT128,
-    TDESC_TYPE_CODE_PTR,
-    TDESC_TYPE_DATA_PTR,
-    TDESC_TYPE_IEEE_SINGLE,
-    TDESC_TYPE_IEEE_DOUBLE,
-    TDESC_TYPE_ARM_FPA_EXT,
-    TDESC_TYPE_I387_EXT,
-
-    /* Types defined by a target feature.  */
-    TDESC_TYPE_VECTOR,
-    TDESC_TYPE_STRUCT,
-    TDESC_TYPE_UNION,
-    TDESC_TYPE_FLAGS
-  } kind;
+  enum tdesc_type_kind kind;
 
   /* Kind-specific data.  */
   union
@@ -804,7 +805,7 @@ tdesc_data_init (struct obstack *obstack)
 struct tdesc_arch_data *
 tdesc_data_alloc (void)
 {
-  return XZALLOC (struct tdesc_arch_data);
+  return XCNEW (struct tdesc_arch_data);
 }
 
 /* Free something allocated by tdesc_data_alloc, if it is not going
@@ -1242,7 +1243,7 @@ tdesc_create_reg (struct tdesc_feature *feature, const char *name,
                  int regnum, int save_restore, const char *group,
                  int bitsize, const char *type)
 {
-  struct tdesc_reg *reg = XZALLOC (struct tdesc_reg);
+  struct tdesc_reg *reg = XCNEW (struct tdesc_reg);
 
   reg->name = xstrdup (name);
   reg->target_regnum = regnum;
@@ -1304,7 +1305,7 @@ struct tdesc_type *
 tdesc_create_vector (struct tdesc_feature *feature, const char *name,
                     struct tdesc_type *field_type, int count)
 {
-  struct tdesc_type *type = XZALLOC (struct tdesc_type);
+  struct tdesc_type *type = XCNEW (struct tdesc_type);
 
   type->name = xstrdup (name);
   type->kind = TDESC_TYPE_VECTOR;
@@ -1318,7 +1319,7 @@ tdesc_create_vector (struct tdesc_feature *feature, const char *name,
 struct tdesc_type *
 tdesc_create_struct (struct tdesc_feature *feature, const char *name)
 {
-  struct tdesc_type *type = XZALLOC (struct tdesc_type);
+  struct tdesc_type *type = XCNEW (struct tdesc_type);
 
   type->name = xstrdup (name);
   type->kind = TDESC_TYPE_STRUCT;
@@ -1341,7 +1342,7 @@ tdesc_set_struct_size (struct tdesc_type *type, LONGEST size)
 struct tdesc_type *
 tdesc_create_union (struct tdesc_feature *feature, const char *name)
 {
-  struct tdesc_type *type = XZALLOC (struct tdesc_type);
+  struct tdesc_type *type = XCNEW (struct tdesc_type);
 
   type->name = xstrdup (name);
   type->kind = TDESC_TYPE_UNION;
@@ -1354,7 +1355,7 @@ struct tdesc_type *
 tdesc_create_flags (struct tdesc_feature *feature, const char *name,
                    LONGEST size)
 {
-  struct tdesc_type *type = XZALLOC (struct tdesc_type);
+  struct tdesc_type *type = XCNEW (struct tdesc_type);
 
   type->name = xstrdup (name);
   type->kind = TDESC_TYPE_FLAGS;
@@ -1436,7 +1437,7 @@ tdesc_free_feature (struct tdesc_feature *feature)
 struct tdesc_feature *
 tdesc_create_feature (struct target_desc *tdesc, const char *name)
 {
-  struct tdesc_feature *new_feature = XZALLOC (struct tdesc_feature);
+  struct tdesc_feature *new_feature = XCNEW (struct tdesc_feature);
 
   new_feature->name = xstrdup (name);
 
@@ -1447,7 +1448,7 @@ tdesc_create_feature (struct target_desc *tdesc, const char *name)
 struct target_desc *
 allocate_target_description (void)
 {
-  return XZALLOC (struct target_desc);
+  return XCNEW (struct target_desc);
 }
 
 static void
@@ -1550,7 +1551,7 @@ static struct cmd_list_element *tdesc_unset_cmdlist;
 static void
 set_tdesc_cmd (char *args, int from_tty)
 {
-  help_list (tdesc_set_cmdlist, "set tdesc ", -1, gdb_stdout);
+  help_list (tdesc_set_cmdlist, "set tdesc ", all_commands, gdb_stdout);
 }
 
 static void
@@ -1562,7 +1563,7 @@ show_tdesc_cmd (char *args, int from_tty)
 static void
 unset_tdesc_cmd (char *args, int from_tty)
 {
-  help_list (tdesc_unset_cmdlist, "unset tdesc ", -1, gdb_stdout);
+  help_list (tdesc_unset_cmdlist, "unset tdesc ", all_commands, gdb_stdout);
 }
 
 static void
This page took 0.026982 seconds and 4 git commands to generate.