diff options
author | Tom Tromey <tom@tromey.com> | 2019-07-06 11:32:06 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-08-15 12:29:28 -0600 |
commit | f2dda4778417e2d58a5b0416ff9598f68470cbfa (patch) | |
tree | dc9dbad1c7e2b148683885251447af0d6285c645 /gdb/tui/tui-stack.c | |
parent | ed4a1084d725a5d1aecefc6a430d3059a77c102d (diff) | |
download | gdb-f2dda4778417e2d58a5b0416ff9598f68470cbfa.zip gdb-f2dda4778417e2d58a5b0416ff9598f68470cbfa.tar.gz gdb-f2dda4778417e2d58a5b0416ff9598f68470cbfa.tar.bz2 |
Move locator code to tui-stack.c
The locator is mostly implemented in tui-stack.c. This moves the
remaining bits to tui-stack.c and tui-stack.h, as appropriate.
gdb/ChangeLog
2019-08-15 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c: Include tui-stack.h.
* tui/tui-stack.h (MAX_LOCATOR_ELEMENT_LEN)
(struct tui_locator_window): Move from tui-data.h.
* tui/tui-stack.c (_locator, tui_locator_win_info_ptr)
(tui_initialize_static_data): Move from tui-data.c.
* tui/tui-data.h (MAX_LOCATOR_ELEMENT_LEN)
(struct tui_locator_window): Move to tui-stack.c.
* tui/tui-data.c (_locator, tui_locator_win_info_ptr)
(tui_initialize_static_data): Move to tui-stack.c.
Diffstat (limited to 'gdb/tui/tui-stack.c')
-rw-r--r-- | gdb/tui/tui-stack.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index 0a71223..c67ac1b 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -39,6 +39,8 @@ #include "gdb_curses.h" +static struct tui_locator_window _locator; + /* Get a printable name for the function at the address. The symbol name is demangled if demangling is turned on. Returns a pointer to a static area holding the result. */ @@ -56,6 +58,29 @@ static int tui_set_locator_info (struct gdbarch *gdbarch, static void tui_update_command (const char *, int); +/* Accessor for the locator win info. Answers a pointer to the static + locator win info struct. */ +struct tui_locator_window * +tui_locator_win_info_ptr (void) +{ + return &_locator; +} + +void +tui_initialize_static_data () +{ + tui_gen_win_info *win = tui_locator_win_info_ptr (); + win->width = + win->height = + win->origin.x = + win->origin.y = + win->viewport_height = 0; + win->handle = NULL; + win->is_visible = false; + win->title = 0; +} + + /* Create the status line to display as much information as we can on this single line: target name, process number, current function, current line, current PC, SingleKey mode. */ |