aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-26 15:56:56 -0600
committerTom Tromey <tom@tromey.com>2019-07-17 12:18:54 -0600
commit80cb6c27099e199cca01bc1a2efb8e8fbc941a48 (patch)
tree6f43371dde339a22c8325a17374539db3afe3254 /gdb
parentbaff0c28b83bd1ad7949d07b78fdb85ad6be49a5 (diff)
downloadgdb-80cb6c27099e199cca01bc1a2efb8e8fbc941a48.zip
gdb-80cb6c27099e199cca01bc1a2efb8e8fbc941a48.tar.gz
gdb-80cb6c27099e199cca01bc1a2efb8e8fbc941a48.tar.bz2
Remove tui_display_data_from_line
tui_display_data_from_line is just a wrapper for tui_display_registers_from_line, so remove it. Also, nothing passed 0 as the "force_display" parameter to tui_display_registers_from_line, so remove that parameter as well. gdb/ChangeLog 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 tui_display_registers_from_line. * tui/tui-regs.h (tui_display_registers_from_line): Update. * tui/tui-regs.c (tui_display_registers_from_line): Remove "force_display" parameter.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/tui/tui-regs.c30
-rw-r--r--gdb/tui/tui-regs.h2
-rw-r--r--gdb/tui/tui-windata.c20
-rw-r--r--gdb/tui/tui-windata.h1
5 files changed, 26 insertions, 37 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 813c86d..d7df8fd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
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
+ tui_display_registers_from_line.
+ * tui/tui-regs.h (tui_display_registers_from_line): Update.
+ * tui/tui-regs.c (tui_display_registers_from_line): Remove
+ "force_display" parameter.
+
+2019-07-17 Tom Tromey <tom@tromey.com>
+
* tui/tui-regs.h (tui_first_reg_element_no_inline): Don't
declare.
* tui/tui-regs.c (tui_data_window::first_reg_element_no_inline):
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index d005fe3..ae38d34 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -372,38 +372,34 @@ tui_display_reg_element_at_line (int start_element_no,
data window. Answers the line number that the display actually
started from. If nothing is displayed (-1) is returned. */
int
-tui_display_registers_from_line (int line_no,
- int force_display)
+tui_display_registers_from_line (int line_no)
{
+ tui_check_and_display_highlight_if_needed (TUI_DATA_WIN);
if (!TUI_DATA_WIN->regs_content.empty ())
{
- int line, element_no;
+ int element_no;
if (line_no < 0)
- line = 0;
- else if (force_display)
- { /* If we must display regs (force_display is true), then
- make sure that we don't display off the end of the
+ line_no = 0;
+ else
+ {
+ /* Make sure that we don't display off the end of the
registers. */
if (line_no >= TUI_DATA_WIN->last_regs_line_no ())
{
- if ((line = TUI_DATA_WIN->line_from_reg_element_no (
+ if ((line_no = TUI_DATA_WIN->line_from_reg_element_no (
TUI_DATA_WIN->regs_content.size () - 1)) < 0)
- line = 0;
+ line_no = 0;
}
- else
- line = line_no;
}
- else
- line = line_no;
- element_no = TUI_DATA_WIN->first_reg_element_no_inline (line);
+ element_no = TUI_DATA_WIN->first_reg_element_no_inline (line_no);
if (element_no < TUI_DATA_WIN->regs_content.size ())
- tui_display_reg_element_at_line (element_no, line);
+ tui_display_reg_element_at_line (element_no, line_no);
else
- line = (-1);
+ line_no = (-1);
- return line;
+ return line_no;
}
return (-1); /* Nothing was displayed. */
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index 866af45..c105469 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -27,7 +27,7 @@
extern void tui_check_register_values (struct frame_info *);
extern void tui_show_registers (struct reggroup *group);
extern void tui_display_registers_from (int);
-extern int tui_display_registers_from_line (int, int);
+extern int tui_display_registers_from_line (int);
extern int tui_first_reg_element_inline (int);
#endif /* TUI_TUI_REGS_H */
diff --git a/gdb/tui/tui-windata.c b/gdb/tui/tui-windata.c
index ac3e6d6..4f18d73 100644
--- a/gdb/tui/tui-windata.c
+++ b/gdb/tui/tui-windata.c
@@ -111,22 +111,6 @@ tui_display_all_data (void)
}
-/* Function to display the data starting at line, line_no, in the data
- window. */
-void
-tui_display_data_from_line (int line_no)
-{
- int _line_no = line_no;
-
- if (line_no < 0)
- _line_no = 0;
-
- tui_check_and_display_highlight_if_needed (TUI_DATA_WIN);
-
- tui_display_registers_from_line (_line_no, TRUE);
-}
-
-
/* Display data starting at element element_no. */
void
tui_display_data_from (int element_no, int reuse_windows)
@@ -144,7 +128,7 @@ tui_display_data_from (int element_no, int reuse_windows)
tui_erase_data_content (NULL);
if (!reuse_windows)
tui_delete_data_content_windows ();
- tui_display_data_from_line (first_line);
+ tui_display_registers_from_line (first_line);
}
}
@@ -184,7 +168,7 @@ tui_data_window::do_scroll_vertical (int num_to_scroll)
first_line += num_to_scroll;
tui_erase_data_content (NULL);
tui_delete_data_content_windows ();
- tui_display_data_from_line (first_line);
+ tui_display_registers_from_line (first_line);
}
}
diff --git a/gdb/tui/tui-windata.h b/gdb/tui/tui-windata.h
index 1aba675..fd8e625 100644
--- a/gdb/tui/tui-windata.h
+++ b/gdb/tui/tui-windata.h
@@ -26,7 +26,6 @@
extern void tui_erase_data_content (const char *);
extern void tui_display_all_data (void);
-extern void tui_display_data_from_line (int);
extern void tui_delete_data_content_windows (void);
extern void tui_refresh_data_win (void);
extern void tui_display_data_from (int, int);