Swap tui_show_locator_content and tui_locator_window::rerender
This swaps the bodies ot tui_show_locator_content and tui_locator_window::rerender, so that the latter does the work, and the former is now just an exported convenience wrapper. gdb/ChangeLog 2019-08-30 Tom Tromey <tom@tromey.com> * tui/tui-stack.c (tui_show_locator_content): Move lower. Rewrite. (tui_locator_window::rerender): Rewrite using body of previous tui_show_locator_content.
This commit is contained in:
parent
e594a5d19e
commit
99ab33fb2d
2 changed files with 23 additions and 21 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2019-08-30 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* tui/tui-stack.c (tui_show_locator_content): Move lower. Rewrite.
|
||||||
|
(tui_locator_window::rerender): Rewrite using body of previous
|
||||||
|
tui_show_locator_content.
|
||||||
|
|
||||||
2019-08-30 Tom Tromey <tom@tromey.com>
|
2019-08-30 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* tui/tui-stack.h (struct tui_locator_window) <set_locator_info,
|
* tui/tui-stack.h (struct tui_locator_window) <set_locator_info,
|
||||||
|
|
|
@ -254,38 +254,27 @@ tui_get_function_from_frame (struct frame_info *fi)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_show_locator_content (void)
|
tui_locator_window::rerender ()
|
||||||
{
|
{
|
||||||
char *string;
|
if (handle != NULL)
|
||||||
struct tui_locator_window *locator;
|
|
||||||
|
|
||||||
locator = tui_locator_win_info_ptr ();
|
|
||||||
|
|
||||||
if (locator != NULL && locator->handle != NULL)
|
|
||||||
{
|
{
|
||||||
string = tui_make_status_line (locator);
|
char *string = tui_make_status_line (this);
|
||||||
wmove (locator->handle, 0, 0);
|
wmove (handle, 0, 0);
|
||||||
/* We ignore the return value from wstandout and wstandend, casting
|
/* We ignore the return value from wstandout and wstandend, casting
|
||||||
them to void in order to avoid a compiler warning. The warning
|
them to void in order to avoid a compiler warning. The warning
|
||||||
itself was introduced by a patch to ncurses 5.7 dated 2009-08-29,
|
itself was introduced by a patch to ncurses 5.7 dated 2009-08-29,
|
||||||
changing these macro to expand to code that causes the compiler
|
changing these macro to expand to code that causes the compiler
|
||||||
to generate an unused-value warning. */
|
to generate an unused-value warning. */
|
||||||
(void) wstandout (locator->handle);
|
(void) wstandout (handle);
|
||||||
waddstr (locator->handle, string);
|
waddstr (handle, string);
|
||||||
wclrtoeol (locator->handle);
|
wclrtoeol (handle);
|
||||||
(void) wstandend (locator->handle);
|
(void) wstandend (handle);
|
||||||
locator->refresh_window ();
|
refresh_window ();
|
||||||
wmove (locator->handle, 0, 0);
|
wmove (handle, 0, 0);
|
||||||
xfree (string);
|
xfree (string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
tui_locator_window::rerender ()
|
|
||||||
{
|
|
||||||
tui_show_locator_content ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* See tui-stack.h. */
|
/* See tui-stack.h. */
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -411,6 +400,13 @@ tui_show_frame_info (struct frame_info *fi)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
tui_show_locator_content ()
|
||||||
|
{
|
||||||
|
struct tui_locator_window *locator = tui_locator_win_info_ptr ();
|
||||||
|
locator->rerender ();
|
||||||
|
}
|
||||||
|
|
||||||
/* Function to initialize gdb commands, for tui window stack
|
/* Function to initialize gdb commands, for tui window stack
|
||||||
manipulation. */
|
manipulation. */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue