* ada-valprint.c (ada_val_print_1): Use val_print_string to print
authorUlrich Weigand <uweigand@de.ibm.com>
Mon, 18 May 2009 13:51:52 +0000 (13:51 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Mon, 18 May 2009 13:51:52 +0000 (13:51 +0000)
result of ada_vax_float_print_function inferior call.

gdb/ChangeLog
gdb/ada-valprint.c

index 578ce18aa81518d08df8eb652358935a729a67b1..4a8874e29b166fea8b18fd0b62e032d951503537 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * ada-valprint.c (ada_val_print_1): Use val_print_string to print
+       result of ada_vax_float_print_function inferior call.
+
 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * ada-lang.c (ada_coerce_to_simple_array_type): Reimplement to
index 3da58ea802f8aba82414c1fab6b3ffc1a1c14986..1db677ddca0e8ed179c595df3df8937f85f7290c 100644 (file)
@@ -739,22 +739,10 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr0,
          struct value *func = ada_vax_float_print_function (type);
          if (func != 0)
            {
-             static struct type *parray_of_char = NULL;
-             struct value *printable_val;
-
-             if (parray_of_char == NULL)
-               parray_of_char =
-                 make_pointer_type
-                 (create_array_type
-                  (NULL, builtin_type_true_char,
-                   create_range_type (NULL, builtin_type_int32, 0, 32)), NULL);
-
-             printable_val =
-               value_ind (value_cast (parray_of_char,
-                                      call_function_by_hand (func, 1,
-                                                             &val)));
-
-             fprintf_filtered (stream, "%s", value_contents (printable_val));
+             CORE_ADDR addr;
+             addr = value_as_address (call_function_by_hand (func, 1, &val));
+             val_print_string (builtin_type_true_char,
+                               addr, -1, stream, options);
              return 0;
            }
          /* No special printing function.  Do as best we can.  */
This page took 0.030018 seconds and 4 git commands to generate.