]> Git Repo - binutils.git/blobdiff - gdb/expprint.c
Add an expr::operation_up to struct expression
[binutils.git] / gdb / expprint.c
index 92f1299947295b79fbe7b40edc2569979d967c70..6c65ec0207a200bc4131172ea216f58bb1a36d0a 100644 (file)
@@ -32,6 +32,7 @@
 #include "cli/cli-style.h"
 #include "c-lang.h"
 #include "expop.h"
+#include "ada-exp.h"
 
 #include <ctype.h>
 
@@ -724,6 +725,9 @@ dump_raw_expression (struct expression *exp, struct ui_file *stream,
   char *eltscan;
   int eltsize;
 
+  if (exp->op != nullptr)
+    return;
+
   fprintf_filtered (stream, "Dump of expression @ ");
   gdb_print_host_address (exp, stream);
   if (note)
@@ -1149,9 +1153,22 @@ dump_prefix_expression (struct expression *exp, struct ui_file *stream)
 {
   int elt;
 
+  if (exp->op != nullptr)
+    {
+      exp->op->dump (stream, 0);
+      return;
+    }
+
   fprintf_filtered (stream, "Dump of expression @ ");
   gdb_print_host_address (exp, stream);
   fputs_filtered (", after conversion to prefix form:\nExpression: `", stream);
+
+  if (exp->op != nullptr)
+    {
+      exp->op->dump (stream, 0);
+      return;
+    }
+
   print_expression (exp, stream);
   fprintf_filtered (stream, "'\n\tLanguage %s, %d elements, %ld bytes each.\n",
                    exp->language_defn->name (), exp->nelts,
@@ -1283,4 +1300,19 @@ dump_for_expression (struct ui_file *stream, int depth,
   fprintf_filtered (stream, "\n");
 }
 
+void
+dump_for_expression (struct ui_file *stream, int depth,
+                    const std::unique_ptr<ada_component> &comp)
+{
+  comp->dump (stream, depth);
+}
+
+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 */
This page took 0.027808 seconds and 4 git commands to generate.