aboutsummaryrefslogtreecommitdiff
path: root/gdb/expprint.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-08 07:27:57 -0700
committerTom Tromey <tom@tromey.com>2021-03-08 07:28:14 -0700
commitcae26a0cb05be806ae97d4fabc1cb8e6773a1512 (patch)
treeac4bc202818095d9767164f92fcc317bf0d86912 /gdb/expprint.c
parent75f9892d435f58fd12e26638a56564e374bfa951 (diff)
downloadgdb-cae26a0cb05be806ae97d4fabc1cb8e6773a1512.zip
gdb-cae26a0cb05be806ae97d4fabc1cb8e6773a1512.tar.gz
gdb-cae26a0cb05be806ae97d4fabc1cb8e6773a1512.tar.bz2
Introduce float_const_operation
This adds class float_const_operation, an operation holding a floating-point constant. Unlike most other new operations, this one requires a custom 'dump' method. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * expprint.c (float_const_operation::dump): New method. * expop.h (float_data): New typedef. (class float_const_operation): New.
Diffstat (limited to 'gdb/expprint.c')
-rw-r--r--gdb/expprint.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 92f1299..5826108 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -1283,4 +1283,12 @@ dump_for_expression (struct ui_file *stream, int depth,
fprintf_filtered (stream, "\n");
}
+void
+float_const_operation::dump (struct ui_file *stream, int depth) const
+{
+ fprintf_filtered (stream, _("%*sFloat: "), depth, "");
+ print_floating (m_data.data (), m_type, stream);
+ fprintf_filtered (stream, "\n");
+}
+
} /* namespace expr */