+2019-08-15 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-winsource.h (tui_clear_source_content): Don't declare.
+ * tui/tui-winsource.c (tui_update_source_window_as_is): Don't call
+ tui_clear_source_content.
+ (tui_clear_source_content): Remove.
+ (tui_source_window_base::do_erase_source_content): Hoist call to
+ content.clear().
+ * tui/tui-stack.c (tui_show_frame_info): Don't call
+ tui_clear_source_content.
+
2019-08-15 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (struct tui_source_window_base)
tui_show_locator_content ();
for (struct tui_source_window_base *win_info : tui_source_windows ())
{
- tui_clear_source_content (win_info);
+ win_info->erase_source_content ();
win_info->update_exec_info ();
}
ret = tui_set_disassem_content (win_info, gdbarch, line_or_addr.u.addr);
if (ret == TUI_FAILURE)
- tui_clear_source_content (win_info);
+ win_info->erase_source_content ();
else
{
tui_update_breakpoint_info (win_info, nullptr, false);
else
{
for (struct tui_source_window_base *win_info : tui_source_windows ())
- tui_clear_source_content (win_info);
+ win_info->erase_source_content ();
}
}
}
}
-void
-tui_clear_source_content (struct tui_source_window_base *win_info)
-{
- if (win_info != NULL)
- {
- int i;
-
- win_info->erase_source_content ();
- for (i = 0; i < win_info->content.size (); i++)
- {
- struct tui_source_element *element = &win_info->content[i];
-
- element->break_mode = 0;
- element->is_exec_point = false;
- }
- }
-}
-
-
void
tui_source_window_base::do_erase_source_content (const char *str)
{
int x_pos;
int half_width = (width - 2) / 2;
+ content.clear ();
if (handle != NULL)
{
werase (handle);
x_pos,
(char *) str);
- content.clear ();
refresh_window ();
werase (execution_info->handle);
extern void tui_update_source_windows_with_addr (struct gdbarch *, CORE_ADDR);
extern void tui_update_source_windows_with_line (struct symtab *,
int);
-extern void tui_clear_source_content (struct tui_source_window_base *);
/* Constant definitions. */
#define SCROLL_THRESHOLD 2 /* Threshold for lazy scroll. */