Rewrite ada_value_print_1 floating point case
authorTom Tromey <tom@tromey.com>
Fri, 13 Mar 2020 23:39:52 +0000 (17:39 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 14 Mar 2020 00:03:42 +0000 (18:03 -0600)
This rewrites the TYPE_CODE_FLT case in ada_value_print_1 to be purely
value-based.

gdb/ChangeLog
2020-03-13  Tom Tromey  <tom@tromey.com>

* ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.

gdb/ChangeLog
gdb/ada-valprint.c

index c5c060f36137e80d7d8ab5b8dd473c4f4640bd5f..ebeedb598e6e1754e5a99687a050d208305d9410 100644 (file)
@@ -1,3 +1,7 @@
+2020-03-13  Tom Tromey  <tom@tromey.com>
+
+       * ada-valprint.c (ada_value_print_1) <TYPE_CODE_FLT>: Rewrite.
+
 2020-03-13  Tom Tromey  <tom@tromey.com>
 
        * ada-valprint.c (ada_value_print_ptr): New function.
index 2cb7334b4ecf1b61b5ede7825a20de17f8bb80a1..e0ef410bf0d854405507493afba7eda56fac4bd6 100644 (file)
@@ -1294,9 +1294,14 @@ ada_value_print_1 (struct value *val, struct ui_file *stream, int recurse,
       break;
 
     case TYPE_CODE_FLT:
-      ada_val_print_flt (type, valaddr, 0, 0,
-                        address, stream, recurse, val,
-                        options);
+      if (options->format)
+       {
+         common_val_print (val, stream, recurse, options,
+                           language_def (language_c));
+         break;
+       }
+
+      ada_print_floating (valaddr, type, stream);
       break;
 
     case TYPE_CODE_UNION: