Get rid of support for VAX Floats.
authorJoel Brobecker <brobecker@gnat.com>
Fri, 8 Jan 2010 11:58:23 +0000 (11:58 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 8 Jan 2010 11:58:23 +0000 (11:58 +0000)
        * ada-lang.h (ada_is_vax_floating_type, ada_vax_float_type_suffix)
        (ada_vax_float_print_function): Delete.
        * ada-lang.c (ada_is_vax_floating_type, ada_vax_float_type_suffix)
        (ada_vax_float_print_function): Delete.
        * ada-typeprint.c (print_vax_floating_point_type): Delete.
        (ada_print_type): Remove support for VAX floats.
        * ada-valprint.c (ada_val_print_1): Remove support for VAX floats.

gdb/ChangeLog
gdb/ada-lang.c
gdb/ada-lang.h
gdb/ada-typeprint.c
gdb/ada-valprint.c

index 55ecf849ffa83ddaaa84ca7019914d1e87b46ce2..707b2f20be2422d56913e70e4fdca92422fdf9e7 100644 (file)
@@ -1,4 +1,15 @@
-2010-01-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
+2009-01-08  Joel Brobecker  <brobecker@adacore.com>
+
+       Get rid of support for VAX Floats.
+       * ada-lang.h (ada_is_vax_floating_type, ada_vax_float_type_suffix)
+       (ada_vax_float_print_function): Delete.
+       * ada-lang.c (ada_is_vax_floating_type, ada_vax_float_type_suffix)
+       (ada_vax_float_print_function): Delete.
+       * ada-typeprint.c (print_vax_floating_point_type): Delete.
+       (ada_print_type): Remove support for VAX floats.
+       * ada-valprint.c (ada_val_print_1): Remove support for VAX floats.
+
+2010-01-08  jan kratochvil  <jan.kratochvil@redhat.com>
 
        * stabsread.c (read_args): Handle zero arguments.
 
index a80afa4d7365dcbcb9d6be646a0a9bed8e21cd55..b101d58bb02e3c8f151ccb881aff2818ef084894 100644 (file)
@@ -9656,52 +9656,6 @@ ada_float_to_fixed (struct type *type, DOUBLEST x)
   return (LONGEST) (x / scaling_factor (type) + 0.5);
 }
 
-
-                                /* VAX floating formats */
-
-/* Non-zero iff TYPE represents one of the special VAX floating-point
-   types.  */
-
-int
-ada_is_vax_floating_type (struct type *type)
-{
-  int name_len =
-    (ada_type_name (type) == NULL) ? 0 : strlen (ada_type_name (type));
-  return
-    name_len > 6
-    && (TYPE_CODE (type) == TYPE_CODE_INT
-        || TYPE_CODE (type) == TYPE_CODE_RANGE)
-    && strncmp (ada_type_name (type) + name_len - 6, "___XF", 5) == 0;
-}
-
-/* The type of special VAX floating-point type this is, assuming
-   ada_is_vax_floating_point.  */
-
-int
-ada_vax_float_type_suffix (struct type *type)
-{
-  return ada_type_name (type)[strlen (ada_type_name (type)) - 1];
-}
-
-/* A value representing the special debugging function that outputs
-   VAX floating-point values of the type represented by TYPE.  Assumes
-   ada_is_vax_floating_type (TYPE).  */
-
-struct value *
-ada_vax_float_print_function (struct type *type)
-{
-  switch (ada_vax_float_type_suffix (type))
-    {
-    case 'F':
-      return get_var_value ("DEBUG_STRING_F", 0);
-    case 'D':
-      return get_var_value ("DEBUG_STRING_D", 0);
-    case 'G':
-      return get_var_value ("DEBUG_STRING_G", 0);
-    default:
-      error (_("invalid VAX floating-point type"));
-    }
-}
 \f
 
                                 /* Range types */
index 024550f1297f098cb9ed49d03dee22cdd4ed2538..5568ed0da77aa523caf0630a5b82976cb3a249fd 100644 (file)
@@ -305,12 +305,6 @@ extern DOUBLEST ada_fixed_to_float (struct type *, LONGEST);
 
 extern LONGEST ada_float_to_fixed (struct type *, DOUBLEST);
 
-extern int ada_is_vax_floating_type (struct type *);
-
-extern int ada_vax_float_type_suffix (struct type *);
-
-extern struct value *ada_vax_float_print_function (struct type *);
-
 extern struct type *ada_system_address_type (void);
 
 extern int ada_which_variant_applies (struct type *, struct type *,
index ffbe49eb9b96e9a91ebdf1bbba686e7e85d2d742..74eaabf2afbe8abd6b95a8c90b6ba7f2364fa7c0 100644 (file)
@@ -310,15 +310,6 @@ print_fixed_point_type (struct type *type, struct ui_file *stream)
     }
 }
 
-/* Print representation of special VAX floating-point type TYPE on STREAM.  */
-
-static void
-print_vax_floating_point_type (struct type *type, struct ui_file *stream)
-{
-  fprintf_filtered (stream, "<float format %c>",
-                   ada_vax_float_type_suffix (type));
-}
-
 /* Print simple (constrained) array type TYPE on STREAM.  LEVEL is the
    recursion (indentation) level, in case the element type itself has
    nested structure, and SHOW is the number of levels of internal
@@ -786,8 +777,6 @@ ada_print_type (struct type *type0, char *varstring, struct ui_file *stream,
       case TYPE_CODE_INT:
        if (ada_is_fixed_point_type (type))
          print_fixed_point_type (type, stream);
-       else if (ada_is_vax_floating_type (type))
-         print_vax_floating_point_type (type, stream);
        else
          {
            char *name = ada_type_name (type);
@@ -804,8 +793,6 @@ ada_print_type (struct type *type0, char *varstring, struct ui_file *stream,
       case TYPE_CODE_RANGE:
        if (ada_is_fixed_point_type (type))
          print_fixed_point_type (type, stream);
-       else if (ada_is_vax_floating_type (type))
-         print_vax_floating_point_type (type, stream);
        else if (ada_is_modular_type (type))
          fprintf_filtered (stream, "mod %s", 
                            int_string (ada_modulus (type), 10, 0, 0, 1));
index 7c96db04a77c957191f8335c8d0ff6630747cfb3..e000411efdd263a27e422dbbba07ec1dce98a985 100644 (file)
@@ -744,22 +744,6 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr0,
                            (double) ada_fixed_to_float (type, v));
          return 0;
        }
-      else if (ada_is_vax_floating_type (type))
-       {
-         struct value *val =
-           value_from_contents_and_address (type, valaddr, address);
-         struct value *func = ada_vax_float_print_function (type);
-         if (func != 0)
-           {
-             struct gdbarch *gdbarch = get_type_arch (type);
-             CORE_ADDR addr;
-             addr = value_as_address (call_function_by_hand (func, 1, &val));
-             val_print_string (builtin_type (gdbarch)->builtin_true_char,
-                               addr, -1, stream, options);
-             return 0;
-           }
-         /* No special printing function.  Do as best we can.  */
-       }
       else if (TYPE_CODE (type) == TYPE_CODE_RANGE)
        {
          struct type *target_type = TYPE_TARGET_TYPE (type);
This page took 0.032324 seconds and 4 git commands to generate.