diff options
author | Tom Tromey <tom@tromey.com> | 2020-03-13 17:39:52 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-03-13 18:03:42 -0600 |
commit | b9fa6e07980f901f2a3f99b7eed4356d3209a3c4 (patch) | |
tree | fc4bbc8d781c53b3335273bf47d44e30ba8b9422 | |
parent | 416595d6409b1bd2e2f9862c133ca764688da77f (diff) | |
download | gdb-b9fa6e07980f901f2a3f99b7eed4356d3209a3c4.zip gdb-b9fa6e07980f901f2a3f99b7eed4356d3209a3c4.tar.gz gdb-b9fa6e07980f901f2a3f99b7eed4356d3209a3c4.tar.bz2 |
Rewrite ada_value_print_1 floating point case
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.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/ada-valprint.c | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c5c060f..ebeedb5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 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. (ada_value_print_1): Use it. diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 2cb7334..e0ef410 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -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: |