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:
Tom Tromey 2019-06-05 16:21:24 -06:00
parent 53d666ecfb
commit e43b10e10e
18 changed files with 93 additions and 86 deletions

View file

@ -33,6 +33,7 @@
#include "mi/mi-cmds.h"
#include "python-internal.h"
#include "gdbsupport/gdb_optional.h"
#include "cli/cli-style.h"
enum mi_print_types
{
@ -947,7 +948,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
if (function == NULL)
out->field_skip ("func");
else
out->field_string ("func", function, ui_out_style_kind::FUNCTION);
out->field_string ("func", function, function_name_style.style ());
}
}
@ -987,7 +988,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
out->text (" at ");
annotate_frame_source_file ();
out->field_string ("file", filename.get (),
ui_out_style_kind::FILE);
file_name_style.style ());
annotate_frame_source_file_end ();
}
}