Use raw strings on gdb.python/py-xmethods.exp (and fix Python 3.8's "SyntaxWarning...
[external/binutils.git] / gdb / cli-out.c
index 55c8d2b..549d518 100644 (file)
@@ -93,15 +93,26 @@ cli_ui_out::do_end (ui_out_type type)
 /* output an int field */
 
 void
-cli_ui_out::do_field_int (int fldno, int width, ui_align alignment,
-                         const char *fldname, int value)
+cli_ui_out::do_field_signed (int fldno, int width, ui_align alignment,
+                            const char *fldname, LONGEST value)
 {
   if (m_suppress_output)
     return;
 
-  std::string str = string_printf ("%d", value);
+  do_field_string (fldno, width, alignment, fldname, plongest (value),
+                  ui_out_style_kind::DEFAULT);
+}
+
+/* output an unsigned field */
 
-  do_field_string (fldno, width, alignment, fldname, str.c_str (),
+void
+cli_ui_out::do_field_unsigned (int fldno, int width, ui_align alignment,
+                              const char *fldname, ULONGEST value)
+{
+  if (m_suppress_output)
+    return;
+
+  do_field_string (fldno, width, alignment, fldname, pulongest (value),
                   ui_out_style_kind::DEFAULT);
 }
 
@@ -305,6 +316,12 @@ cli_ui_out::set_stream (struct ui_file *stream)
   return old;
 }
 
+bool
+cli_ui_out::can_emit_style_escape () const
+{
+  return m_streams.back ()->can_emit_style_escape ();
+}
+
 /* CLI interface to display tab-completion matches.  */
 
 /* CLI version of displayer.crlf.  */