diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-05 16:21:24 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-10-01 15:12:37 -0600 |
commit | e43b10e10eba9d9493a0ad40176b2aea9cfb62ab (patch) | |
tree | cc57a08cdee3a133b1f0c726a7596719d47060d7 /gdb/ui-out.h | |
parent | 53d666ecfbb18f836cd4cb9f1de7013e3d03f4df (diff) | |
download | gdb-e43b10e10eba9d9493a0ad40176b2aea9cfb62ab.zip gdb-e43b10e10eba9d9493a0ad40176b2aea9cfb62ab.tar.gz gdb-e43b10e10eba9d9493a0ad40176b2aea9cfb62ab.tar.bz2 |
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.
Diffstat (limited to 'gdb/ui-out.h')
-rw-r--r-- | gdb/ui-out.h | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/gdb/ui-out.h b/gdb/ui-out.h index 7041d96..6732f04 100644 --- a/gdb/ui-out.h +++ b/gdb/ui-out.h @@ -26,6 +26,7 @@ #include <vector> #include "gdbsupport/enum-flags.h" +#include "ui-style.h" class ui_out_level; class ui_out_table; @@ -67,22 +68,6 @@ enum ui_out_type ui_out_type_list }; -/* Possible kinds of styling. */ - -enum class ui_out_style_kind -{ - /* The default (plain) style. */ - DEFAULT, - /* File name. */ - FILE, - /* Function name. */ - FUNCTION, - /* Variable name. */ - VARIABLE, - /* Address. */ - ADDRESS -}; - class ui_out { public: @@ -115,10 +100,10 @@ class ui_out void field_core_addr (const char *fldname, struct gdbarch *gdbarch, CORE_ADDR address); void field_string (const char *fldname, const char *string, - ui_out_style_kind style = ui_out_style_kind::DEFAULT); + const ui_file_style &style = ui_file_style ()); void field_string (const char *fldname, const std::string &string); void field_stream (const char *fldname, string_file &stream, - ui_out_style_kind style = ui_out_style_kind::DEFAULT); + const ui_file_style &style = ui_file_style ()); void field_skip (const char *fldname); void field_fmt (const char *fldname, const char *format, ...) ATTRIBUTE_PRINTF (3, 4); @@ -169,7 +154,7 @@ class ui_out const char *fldname) = 0; virtual void do_field_string (int fldno, int width, ui_align align, const char *fldname, const char *string, - ui_out_style_kind style) = 0; + const ui_file_style &style) = 0; virtual void do_field_fmt (int fldno, int width, ui_align align, const char *fldname, const char *format, va_list args) |