public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Remove tui_display_data_from Date: Wed, 17 Jul 2019 18:37:00 -0000 [thread overview] Message-ID: <20190717183717.61594.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=df5f8cab00a8076a5582efec028002d323950c8f commit df5f8cab00a8076a5582efec028002d323950c8f Author: Tom Tromey <tom@tromey.com> Date: Wed Jun 26 16:00:05 2019 -0600 Remove tui_display_data_from tui_display_data_from is only called from a single place. Inlining it there lets us remove some uses of the TUI_DATA_WIN global. gdb/ChangeLog 2019-07-17 Tom Tromey <tom@tromey.com> * tui/tui-windata.h (tui_display_data_from): Don't declare. * tui/tui-windata.c (tui_display_data_from): Remove. (tui_data_window::refresh_all): Update. Diff: --- gdb/ChangeLog | 6 ++++++ gdb/tui/tui-windata.c | 35 ++++++++++++----------------------- gdb/tui/tui-windata.h | 1 - 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d7df8fd..3daafb3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2019-07-17 Tom Tromey <tom@tromey.com> + * tui/tui-windata.h (tui_display_data_from): Don't declare. + * tui/tui-windata.c (tui_display_data_from): Remove. + (tui_data_window::refresh_all): Update. + +2019-07-17 Tom Tromey <tom@tromey.com> + * tui/tui-windata.h (tui_display_data_from_line): Don't declare. * tui/tui-windata.c (tui_display_data_from_line): Remove. (tui_display_data_from, tui_data_window::do_scroll_vertical): Call diff --git a/gdb/tui/tui-windata.c b/gdb/tui/tui-windata.c index 4f18d73..722d0a5 100644 --- a/gdb/tui/tui-windata.c +++ b/gdb/tui/tui-windata.c @@ -111,28 +111,6 @@ tui_display_all_data (void) } -/* Display data starting at element element_no. */ -void -tui_display_data_from (int element_no, int reuse_windows) -{ - int first_line = (-1); - - if (element_no < TUI_DATA_WIN->regs_content.size ()) - first_line = TUI_DATA_WIN->line_from_reg_element_no (element_no); - else - { /* Calculate the first_line from the element number. */ - } - - if (first_line >= 0) - { - tui_erase_data_content (NULL); - if (!reuse_windows) - tui_delete_data_content_windows (); - tui_display_registers_from_line (first_line); - } -} - - /* Function to redisplay the contents of the data window. */ void tui_data_window::refresh_all () @@ -143,7 +121,18 @@ tui_data_window::refresh_all () int first_element = first_data_item_displayed (); if (first_element >= 0) /* Re-use existing windows. */ - tui_display_data_from (first_element, TRUE); + { + int first_line = (-1); + + if (first_element < regs_content.size ()) + first_line = line_from_reg_element_no (first_element); + + if (first_line >= 0) + { + tui_erase_data_content (NULL); + tui_display_registers_from_line (first_line); + } + } } } diff --git a/gdb/tui/tui-windata.h b/gdb/tui/tui-windata.h index fd8e625..9970cfa 100644 --- a/gdb/tui/tui-windata.h +++ b/gdb/tui/tui-windata.h @@ -28,6 +28,5 @@ extern void tui_erase_data_content (const char *); extern void tui_display_all_data (void); extern void tui_delete_data_content_windows (void); extern void tui_refresh_data_win (void); -extern void tui_display_data_from (int, int); #endif /* TUI_TUI_WINDATA_H */
reply other threads:[~2019-07-17 18:37 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190717183717.61594.qmail@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).