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/stack.c | |
parent | 53d666ecfbb18f836cd4cb9f1de7013e3d03f4df (diff) | |
download | binutils-e43b10e10eba9d9493a0ad40176b2aea9cfb62ab.zip binutils-e43b10e10eba9d9493a0ad40176b2aea9cfb62ab.tar.gz binutils-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/stack.c')
-rw-r--r-- | gdb/stack.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index 0f7fbf5..4899d0f 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -54,6 +54,7 @@ #include "observable.h" #include "gdbsupport/def-vector.h" #include "cli/cli-option.h" +#include "cli/cli-style.h" /* The possible choices of "set print frame-arguments", and the value of this setting. */ @@ -381,7 +382,7 @@ print_frame_arg (const frame_print_options &fp_opts, if (arg->entry_kind == print_entry_values_only || arg->entry_kind == print_entry_values_compact) stb.puts ("@entry"); - uiout->field_stream ("name", stb, ui_out_style_kind::VARIABLE); + uiout->field_stream ("name", stb, variable_name_style.style ()); annotate_arg_name_end (); uiout->text ("="); @@ -1005,18 +1006,18 @@ print_frame_info (const frame_print_options &fp_opts, { annotate_function_call (); uiout->field_string ("func", "<function called from gdb>", - ui_out_style_kind::FUNCTION); + function_name_style.style ()); } else if (get_frame_type (frame) == SIGTRAMP_FRAME) { annotate_signal_handler_caller (); uiout->field_string ("func", "<signal handler called>", - ui_out_style_kind::FUNCTION); + function_name_style.style ()); } else if (get_frame_type (frame) == ARCH_FRAME) { uiout->field_string ("func", "<cross-architecture call>", - ui_out_style_kind::FUNCTION); + function_name_style.style ()); } uiout->text ("\n"); annotate_frame_end (); @@ -1310,7 +1311,7 @@ print_frame (const frame_print_options &fp_opts, print_pc (uiout, gdbarch, frame, pc); else uiout->field_string ("addr", "<unavailable>", - ui_out_style_kind::ADDRESS); + address_style.style ()); annotate_frame_address_end (); uiout->text (" in "); } @@ -1319,7 +1320,7 @@ print_frame (const frame_print_options &fp_opts, string_file stb; fprintf_symbol_filtered (&stb, funname ? funname.get () : "??", funlang, DMGL_ANSI); - uiout->field_stream ("func", stb, ui_out_style_kind::FUNCTION); + uiout->field_stream ("func", stb, function_name_style.style ()); uiout->wrap_hint (" "); annotate_frame_args (); @@ -1361,7 +1362,8 @@ print_frame (const frame_print_options &fp_opts, uiout->wrap_hint (" "); uiout->text (" at "); annotate_frame_source_file (); - uiout->field_string ("file", filename_display, ui_out_style_kind::FILE); + uiout->field_string ("file", filename_display, + file_name_style.style ()); if (uiout->is_mi_like_p ()) { const char *fullname = symtab_to_fullname (sal.symtab); |