From 7a02bab704afdc2c46e056da166eaaa025ff4b03 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 1 Jul 2020 21:21:12 -0600 Subject: Remove tui_expand_tabs tui_expand_tabs only has a single caller. This patch removes this function, in favor of a tab-expanding variant of string_file. This simplifies the code somewhat. gdb/ChangeLog 2020-07-01 Tom Tromey * tui/tui-regs.h (struct tui_data_item_window) : Now a std::string. * tui/tui-regs.c (class tab_expansion_file): New. (tab_expansion_file::write): New method. (tui_register_format): Change return type. Use tab_expansion_file. (tui_get_register, tui_data_window::display_registers_from) (tui_data_item_window::rerender): Update. * tui/tui-io.h (tui_expand_tabs): Don't declare. * tui/tui-io.c (tui_expand_tabs): Remove. --- gdb/tui/tui-regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/tui/tui-regs.h') diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h index df8c273..250f4e7 100644 --- a/gdb/tui/tui-regs.h +++ b/gdb/tui/tui-regs.h @@ -52,7 +52,7 @@ struct tui_data_item_window : public tui_gen_win_info /* The register number, or data display number. */ int item_no = -1; bool highlight = false; - gdb::unique_xmalloc_ptr content; + std::string content; }; /* The TUI registers window. */ -- cgit v1.1