mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
Remove the ui_out_style_kind enum
This removes the ui_out_style_kind enum, in favor of simply using ui_file_style references. This simplifies the code somewhat. gdb/ChangeLog 2019-10-01 Tom Tromey <tom@tromey.com> * ui-out.h (enum class ui_out_style_kind): Remove. (class ui_out) <field_string, field_stsream, do_field_string>: Change type of "style". * ui-out.c (ui_out::field_core_addr, ui_out::field_stream) (ui_out::field_string): Update. * tui/tui-out.h (class tui_ui_out) <do_field_string>: Change type of "style". * tui/tui-out.c (tui_ui_out::do_field_string): Update. * tracepoint.c (print_one_static_tracepoint_marker): Update. * stack.c (print_frame_arg, print_frame_info, print_frame): Update. * source.c (print_source_lines_base): Update. * solib.c (info_sharedlibrary_command): Update. * skip.c (info_skip_command): Update. * record-btrace.c (btrace_call_history_src_line) (btrace_call_history): Update. * python/py-framefilter.c (py_print_frame): Update. * mi/mi-out.h (class mi_ui_out) <do_field_string>: Change type of "style". * mi/mi-out.c (mi_ui_out::do_table_header) (mi_ui_out::do_field_signed, mi_ui_out::do_field_unsigned) (mi_ui_out::do_field_string): Update. * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Update. * cli-out.h (class cli_ui_out) <do_field_string>: Change type of "style". * cli-out.c (cli_ui_out::do_table_header) (cli_ui_out::do_field_signed, cli_ui_out::do_field_unsigned) (cli_ui_out::do_field_skip, cli_ui_out::do_field_string) (cli_ui_out::do_field_fmt): Update. * breakpoint.c (print_breakpoint_location): Update. (update_static_tracepoint): Update.
This commit is contained in:
@ -70,9 +70,9 @@ mi_ui_out::do_table_header (int width, ui_align alignment,
|
||||
do_field_signed (0, 0, ui_center, "width", width);
|
||||
do_field_signed (0, 0, ui_center, "alignment", alignment);
|
||||
do_field_string (0, 0, ui_center, "col_name", col_name.c_str (),
|
||||
ui_out_style_kind::DEFAULT);
|
||||
ui_file_style ());
|
||||
do_field_string (0, width, alignment, "colhdr", col_hdr.c_str (),
|
||||
ui_out_style_kind::DEFAULT);
|
||||
ui_file_style ());
|
||||
close (ui_out_type_tuple);
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ mi_ui_out::do_field_signed (int fldno, int width, ui_align alignment,
|
||||
const char *fldname, LONGEST value)
|
||||
{
|
||||
do_field_string (fldno, width, alignment, fldname, plongest (value),
|
||||
ui_out_style_kind::DEFAULT);
|
||||
ui_file_style ());
|
||||
}
|
||||
|
||||
/* Output an unsigned field. */
|
||||
@ -109,7 +109,7 @@ mi_ui_out::do_field_unsigned (int fldno, int width, ui_align alignment,
|
||||
const char *fldname, ULONGEST value)
|
||||
{
|
||||
do_field_string (fldno, width, alignment, fldname, pulongest (value),
|
||||
ui_out_style_kind::DEFAULT);
|
||||
ui_file_style ());
|
||||
}
|
||||
|
||||
/* Used to omit a field. */
|
||||
@ -126,7 +126,7 @@ mi_ui_out::do_field_skip (int fldno, int width, ui_align alignment,
|
||||
void
|
||||
mi_ui_out::do_field_string (int fldno, int width, ui_align align,
|
||||
const char *fldname, const char *string,
|
||||
ui_out_style_kind style)
|
||||
const ui_file_style &style)
|
||||
{
|
||||
ui_file *stream = m_streams.back ();
|
||||
field_separator ();
|
||||
|
@ -66,7 +66,7 @@ protected:
|
||||
const char *fldname) override;
|
||||
virtual void do_field_string (int fldno, int width, ui_align align,
|
||||
const char *fldname, const char *string,
|
||||
ui_out_style_kind style) override;
|
||||
const ui_file_style &style) override;
|
||||
virtual void do_field_fmt (int fldno, int width, ui_align align,
|
||||
const char *fldname, const char *format, va_list args)
|
||||
override ATTRIBUTE_PRINTF (6,0);
|
||||
|
Reference in New Issue
Block a user