Define YYOBJ in terms of YYFILES
[deliverable/binutils-gdb.git] / gdb / target-descriptions.c
index 2b3c1462f576cd3e11e439ee295ffd36abef588c..7896dd159989bfc4a950033b6be20c0ae6e3118b 100644 (file)
@@ -93,9 +93,7 @@ typedef struct tdesc_reg : tdesc_element
     xfree (group);
   }
 
-  /* Disable copying.  */
-  tdesc_reg (const tdesc_reg &) = delete;
-  tdesc_reg &operator= (const tdesc_reg &) = delete;
+  DISABLE_COPY_AND_ASSIGN (tdesc_reg);
 
   /* The name of this register.  In standard features, it may be
      recognized by the architecture support code, or it may be purely
@@ -229,9 +227,8 @@ typedef struct tdesc_type : tdesc_element
       }
     xfree ((char *) name);
   }
-  /* Disable copying.  */
-  tdesc_type (const tdesc_type &) = delete;
-  tdesc_type &operator= (const tdesc_type &) = delete;
+
+  DISABLE_COPY_AND_ASSIGN (tdesc_type);
 
   /* 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
@@ -302,9 +299,7 @@ typedef struct tdesc_feature : tdesc_element
     xfree (name);
   }
 
-  /* Disable copying.  */
-  tdesc_feature (const tdesc_feature &) = delete;
-  tdesc_feature &operator= (const tdesc_feature &) = delete;
+  DISABLE_COPY_AND_ASSIGN (tdesc_feature);
 
   /* The name of this feature.  It may be recognized by the architecture
      support code.  */
@@ -1072,7 +1067,7 @@ tdesc_gdb_type (struct gdbarch *gdbarch, struct tdesc_type *tdesc_type)
        int ix;
 
        type = arch_flags_type (gdbarch, tdesc_type->name,
-                               tdesc_type->u.u.size);
+                               tdesc_type->u.u.size * TARGET_CHAR_BIT);
        for (ix = 0;
             VEC_iterate (tdesc_type_field, tdesc_type->u.u.fields, ix, f);
             ix++)
@@ -1095,7 +1090,8 @@ tdesc_gdb_type (struct gdbarch *gdbarch, struct tdesc_type *tdesc_type)
        int ix;
 
        type = arch_type (gdbarch, TYPE_CODE_ENUM,
-                         tdesc_type->u.u.size, tdesc_type->name);
+                         tdesc_type->u.u.size * TARGET_CHAR_BIT,
+                         tdesc_type->name);
        TYPE_UNSIGNED (type) = 1;
        for (ix = 0;
             VEC_iterate (tdesc_type_field, tdesc_type->u.u.fields, ix, f);
@@ -1860,25 +1856,25 @@ static struct cmd_list_element *tdesc_unset_cmdlist;
 /* Helper functions for the CLI commands.  */
 
 static void
-set_tdesc_cmd (char *args, int from_tty)
+set_tdesc_cmd (const char *args, int from_tty)
 {
   help_list (tdesc_set_cmdlist, "set tdesc ", all_commands, gdb_stdout);
 }
 
 static void
-show_tdesc_cmd (char *args, int from_tty)
+show_tdesc_cmd (const char *args, int from_tty)
 {
   cmd_show_list (tdesc_show_cmdlist, from_tty, "");
 }
 
 static void
-unset_tdesc_cmd (char *args, int from_tty)
+unset_tdesc_cmd (const char *args, int from_tty)
 {
   help_list (tdesc_unset_cmdlist, "unset tdesc ", all_commands, gdb_stdout);
 }
 
 static void
-set_tdesc_filename_cmd (char *args, int from_tty,
+set_tdesc_filename_cmd (const char *args, int from_tty,
                        struct cmd_list_element *c)
 {
   xfree (target_description_filename);
@@ -1904,7 +1900,7 @@ show_tdesc_filename_cmd (struct ui_file *file, int from_tty,
 }
 
 static void
-unset_tdesc_filename_cmd (char *args, int from_tty)
+unset_tdesc_filename_cmd (const char *args, int from_tty)
 {
   xfree (target_description_filename);
   target_description_filename = NULL;
@@ -2293,7 +2289,7 @@ private:
 };
 
 static void
-maint_print_c_tdesc_cmd (char *args, int from_tty)
+maint_print_c_tdesc_cmd (const char *args, int from_tty)
 {
   const struct target_desc *tdesc;
   const char *filename;
@@ -2331,7 +2327,9 @@ maint_print_c_tdesc_cmd (char *args, int from_tty)
      counterparts.  */
   if (startswith (filename_after_features.c_str (), "i386/32bit-")
       || startswith (filename_after_features.c_str (), "i386/64bit-")
-      || startswith (filename_after_features.c_str (), "i386/x32-core.xml"))
+      || startswith (filename_after_features.c_str (), "i386/x32-core.xml")
+      || startswith (filename_after_features.c_str (), "tic6x-")
+      || startswith (filename_after_features.c_str (), "aarch64"))
     {
       print_c_feature v (filename_after_features);
 
@@ -2367,7 +2365,7 @@ record_xml_tdesc (const char *xml_file, const struct target_desc *tdesc)
    found in the specified directory DIR.  */
 
 static void
-maintenance_check_xml_descriptions (char *dir, int from_tty)
+maintenance_check_xml_descriptions (const char *dir, int from_tty)
 {
   if (dir == NULL)
     error (_("Missing dir name"));
@@ -2389,9 +2387,6 @@ maintenance_check_xml_descriptions (char *dir, int from_tty)
                   (long) selftests::xml_tdesc.size (), failed);
 }
 
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_target_descriptions;
-
 void
 _initialize_target_descriptions (void)
 {
This page took 0.025574 seconds and 4 git commands to generate.