diff mbox

[48/55] Rewrite ada_value_print_1 floating point case

Message ID 20191208182958.10181-49-tom@tromey.com
State New
Headers show

Commit Message

Tom Tromey Dec. 8, 2019, 6:29 p.m. UTC
This rewrites the TYPE_CODE_FLT case in ada_value_print_1 to be purely
value-based.

gdb/ChangeLog
2019-12-08  Tom Tromey  <tom@tromey.com>

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

Change-Id: I05c0c13d910c551ee9f69d948bb7889e28dd32c1
---
 gdb/ChangeLog      |  4 ++++
 gdb/ada-valprint.c | 11 ++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index b3fb9512f57..0286ced7c30 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -1291,9 +1291,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: