public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] Remove unused parameter from two TUI functions Date: Fri, 19 Jul 2019 02:36:00 -0000 [thread overview] Message-ID: <caf0bc4e8bafc387c8136c0f63748e56245f779a@gdb-build> (raw) *** TEST RESULTS FOR COMMIT caf0bc4e8bafc387c8136c0f63748e56245f779a *** commit caf0bc4e8bafc387c8136c0f63748e56245f779a Author: Tom Tromey <tom@tromey.com> AuthorDate: Fri Jun 28 22:48:33 2019 -0600 Commit: Tom Tromey <tom@tromey.com> CommitDate: Wed Jul 17 12:19:07 2019 -0600 Remove unused parameter from two TUI functions The "display_prompt" parameter of tui_erase_source_content and tui_clear_source_content was never passed the NO_EMPTY_SOURCE_PROMPT value, so remove the parameter. Once this is done, the EMPTY_SOURCE_PROMPT and NO_EMPTY_SOURCE_PROMPT defines are unused, so remove those as well. gdb/ChangeLog 2019-07-17 Tom Tromey <tom@tromey.com> * tui/tui-winsource.h (tui_erase_source_content) (tui_clear_source_content): Remove "display_prompt" parameter. * tui/tui-winsource.c (tui_update_source_window_as_is) (tui_update_source_windows_with_addr): Update. (tui_clear_source_content): Remove "display_prompt" parameter. (tui_erase_source_content): Likewise. Simplify. (tui_show_source_content): Update. * tui/tui-win.c (tui_resize_all, tui_adjust_win_heights): Update. * tui/tui-stack.c (tui_show_frame_info): Update. * tui/tui-data.h (EMPTY_SOURCE_PROMPT, NO_EMPTY_SOURCE_PROMPT): Remove defines. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cc37265552..5f7547b154 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,17 @@ +2019-07-17 Tom Tromey <tom@tromey.com> + + * tui/tui-winsource.h (tui_erase_source_content) + (tui_clear_source_content): Remove "display_prompt" parameter. + * tui/tui-winsource.c (tui_update_source_window_as_is) + (tui_update_source_windows_with_addr): Update. + (tui_clear_source_content): Remove "display_prompt" parameter. + (tui_erase_source_content): Likewise. Simplify. + (tui_show_source_content): Update. + * tui/tui-win.c (tui_resize_all, tui_adjust_win_heights): Update. + * tui/tui-stack.c (tui_show_frame_info): Update. + * tui/tui-data.h (EMPTY_SOURCE_PROMPT, NO_EMPTY_SOURCE_PROMPT): + Remove defines. + 2019-07-17 Tom Tromey <tom@tromey.com> * tui/tui-winsource.c (tui_update_source_window_as_is): Update. diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 48c5614b8d..48b09b4513 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -109,8 +109,6 @@ enum tui_box #define NO_HILITE FALSE #define WITH_LOCATOR TRUE #define NO_LOCATOR FALSE -#define EMPTY_SOURCE_PROMPT TRUE -#define NO_EMPTY_SOURCE_PROMPT FALSE #define UNDEFINED_ITEM -1 #define MIN_WIN_HEIGHT 3 #define MIN_CMD_WIN_HEIGHT 3 diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index b466b5fe7f..6acc2277c0 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -444,7 +444,7 @@ tui_show_frame_info (struct frame_info *fi) tui_show_locator_content (); for (struct tui_source_window_base *win_info : tui_source_windows ()) { - tui_clear_source_content (win_info, EMPTY_SOURCE_PROMPT); + tui_clear_source_content (win_info); tui_update_exec_info (win_info); } diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 7abb8d1e98..52f0c51f32 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -610,7 +610,7 @@ tui_resize_all (void) first_win->make_visible_with_new_height (); TUI_CMD_WIN->make_visible_with_new_height (); if (src_win->content.empty ()) - tui_erase_source_content (src_win, EMPTY_SOURCE_PROMPT); + tui_erase_source_content (src_win); break; default: if (cur_layout == SRC_DISASSEM_COMMAND) @@ -675,7 +675,7 @@ tui_resize_all (void) second_win->make_visible_with_new_height (); TUI_CMD_WIN->make_visible_with_new_height (); if (src_win->content.empty ()) - tui_erase_source_content (src_win, EMPTY_SOURCE_PROMPT); + tui_erase_source_content (src_win); break; } /* Now remove all invisible windows, and their content so that @@ -1113,8 +1113,7 @@ tui_adjust_win_heights (struct tui_win_info *primary_win_info, tui_source_window_base *src_base = (tui_source_window_base *) src_win_info; if (src_base->content.empty ()) - tui_erase_source_content (src_base, - EMPTY_SOURCE_PROMPT); + tui_erase_source_content (src_base); } } else @@ -1221,9 +1220,9 @@ tui_adjust_win_heights (struct tui_win_info *primary_win_info, second_win->make_visible_with_new_height (); first_win->make_visible_with_new_height (); if (src1 != nullptr && src1->content.empty ()) - tui_erase_source_content (src1, EMPTY_SOURCE_PROMPT); + tui_erase_source_content (src1); if (second_win->content.empty ()) - tui_erase_source_content (second_win, EMPTY_SOURCE_PROMPT); + tui_erase_source_content (second_win); } } } diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index a72ba36018..65aa516412 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -101,7 +101,7 @@ tui_update_source_window_as_is (struct tui_source_window_base *win_info, if (ret == TUI_FAILURE) { - tui_clear_source_content (win_info, EMPTY_SOURCE_PROMPT); + tui_clear_source_content (win_info); tui_clear_exec_info_content (win_info); } else @@ -162,7 +162,7 @@ tui_update_source_windows_with_addr (struct gdbarch *gdbarch, CORE_ADDR addr) { for (struct tui_source_window_base *win_info : tui_source_windows ()) { - tui_clear_source_content (win_info, EMPTY_SOURCE_PROMPT); + tui_clear_source_content (win_info); tui_clear_exec_info_content (win_info); } } @@ -205,15 +205,14 @@ tui_update_source_windows_with_line (struct symtab *s, int line) } void -tui_clear_source_content (struct tui_source_window_base *win_info, - int display_prompt) +tui_clear_source_content (struct tui_source_window_base *win_info) { if (win_info != NULL) { int i; win_info->content_in_use = false; - tui_erase_source_content (win_info, display_prompt); + tui_erase_source_content (win_info); for (i = 0; i < win_info->content.size (); i++) { struct tui_source_element *element = &win_info->content[i]; @@ -226,8 +225,7 @@ tui_clear_source_content (struct tui_source_window_base *win_info, void -tui_erase_source_content (struct tui_source_window_base *win_info, - int display_prompt) +tui_erase_source_content (struct tui_source_window_base *win_info) { int x_pos; int half_width = (win_info->width - 2) / 2; @@ -236,30 +234,29 @@ tui_erase_source_content (struct tui_source_window_base *win_info, { werase (win_info->handle); tui_check_and_display_highlight_if_needed (win_info); - if (display_prompt == EMPTY_SOURCE_PROMPT) - { - const char *no_src_str; - - if (win_info->type == SRC_WIN) - no_src_str = NO_SRC_STRING; - else - no_src_str = NO_DISASSEM_STRING; - if (strlen (no_src_str) >= half_width) - x_pos = 1; - else - x_pos = half_width - strlen (no_src_str); - mvwaddstr (win_info->handle, - (win_info->height / 2), - x_pos, - (char *) no_src_str); - - /* elz: Added this function call to set the real contents of - the window to what is on the screen, so that later calls - to refresh, do display the correct stuff, and not the old - image. */ - - tui_set_source_content_nil (win_info, no_src_str); - } + + const char *no_src_str; + + if (win_info->type == SRC_WIN) + no_src_str = NO_SRC_STRING; + else + no_src_str = NO_DISASSEM_STRING; + if (strlen (no_src_str) >= half_width) + x_pos = 1; + else + x_pos = half_width - strlen (no_src_str); + mvwaddstr (win_info->handle, + (win_info->height / 2), + x_pos, + (char *) no_src_str); + + /* elz: Added this function call to set the real contents of + the window to what is on the screen, so that later calls + to refresh, do display the correct stuff, and not the old + image. */ + + tui_set_source_content_nil (win_info, no_src_str); + win_info->refresh_window (); } } @@ -302,7 +299,7 @@ tui_show_source_content (struct tui_source_window_base *win_info) tui_show_source_line (win_info, lineno); } else - tui_erase_source_content (win_info, TRUE); + tui_erase_source_content (win_info); tui_check_and_display_highlight_if_needed (win_info); win_info->refresh_window (); diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index c1087f4490..a4907e6cc4 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -57,8 +57,8 @@ extern void tui_update_source_window_as_is (struct tui_source_window_base *, 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 *, int); -extern void tui_erase_source_content (struct tui_source_window_base *, int); +extern void tui_clear_source_content (struct tui_source_window_base *); +extern void tui_erase_source_content (struct tui_source_window_base *); extern void tui_show_source_content (struct tui_source_window_base *); extern void tui_set_exec_info_content (struct tui_source_window_base *); extern void tui_show_exec_info_content (struct tui_source_window_base *);
next reply other threads:[~2019-07-19 2:27 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-19 2:36 gdb-buildbot [this message] 2019-07-19 2:35 ` Failures on Fedora-x86_64-cc-with-index, branch master gdb-buildbot 2019-07-19 2:45 ` Failures on Fedora-x86_64-m32, " gdb-buildbot 2019-07-19 3:04 ` Failures on Fedora-i686, " gdb-buildbot 2019-07-19 3:19 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot 2019-07-19 3:23 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-native-gdbserver-m32, branch master *** BREAKAGE *** gdb-buildbot 2019-07-19 3:39 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch master gdb-buildbot 2019-07-19 4:20 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
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=caf0bc4e8bafc387c8136c0f63748e56245f779a@gdb-build \ --to=gdb-buildbot@sergiodj.net \ --cc=gdb-testers@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).