/* Output generating routines for GDB CLI.
- Copyright (C) 1999-2018 Free Software Foundation, Inc.
+ Copyright (C) 1999-2019 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
Written by Fernando Nasser for Cygnus.
/* 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);
+}
- do_field_string (fldno, width, alignment, fldname, str.c_str (),
+/* output an unsigned field */
+
+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);
}
case ui_out_style_kind::FUNCTION:
fstyle = function_name_style.style ();
break;
+ case ui_out_style_kind::VARIABLE:
+ fstyle = variable_name_style.style ();
+ break;
+ case ui_out_style_kind::ADDRESS:
+ fstyle = address_style.style ();
+ break;
default:
gdb_assert_not_reached ("missing case");
}
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. */