Add set_repeat_arguments function
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index 43234759396806d50665dd2a41d4cf55308eab9b..51e3d384798acce8e80d3215223ea725755c6186 100644 (file)
@@ -38,7 +38,7 @@
 #include "ui-out.h"
 #include "block.h"
 #include "disasm.h"
-#include "dfp.h"
+#include "target-float.h"
 #include "observer.h"
 #include "solist.h"
 #include "parser-defs.h"
@@ -1646,7 +1646,7 @@ x_command (char *exp, int from_tty)
          repeated with Newline.  But don't clobber a user-defined
          command's definition.  */
       if (from_tty)
-       *exp = 0;
+       set_repeat_arguments ("");
       val = evaluate_expression (expr.get ());
       if (TYPE_IS_REFERENCE (value_type (val)))
        val = coerce_ref (val);
@@ -2360,13 +2360,8 @@ printf_floating (struct ui_file *stream, const char *format,
   value = value_cast (fmt_type, value);
 
   /* Convert the value to a string and print it.  */
-  std::string str;
-  if (TYPE_CODE (fmt_type) == TYPE_CODE_FLT)
-    str = floatformat_to_string (floatformat_from_type (fmt_type),
-                                value_contents (value), format);
-  else
-    str = decimal_to_string (value_contents (value),
-                            TYPE_LENGTH (fmt_type), byte_order, format);
+  std::string str
+    = target_float_to_string (value_contents (value), fmt_type, format);
   fputs_filtered (str.c_str (), stream);
 }
 
This page took 0.02381 seconds and 4 git commands to generate.