OLD | NEW |
1 /* TUI display registers in window. | 1 /* TUI display registers in window. |
2 | 2 |
3 Copyright (C) 1998-2004, 2007-2012 Free Software Foundation, Inc. | 3 Copyright (C) 1998-2004, 2007-2012 Free Software Foundation, Inc. |
4 | 4 |
5 Contributed by Hewlett-Packard Company. | 5 Contributed by Hewlett-Packard Company. |
6 | 6 |
7 This file is part of GDB. | 7 This file is part of GDB. |
8 | 8 |
9 This program is free software; you can redistribute it and/or modify | 9 This program is free software; you can redistribute it and/or modify |
10 it under the terms of the GNU General Public License as published by | 10 it under the terms of the GNU General Public License as published by |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 if ((line_no * TUI_DATA_WIN->detail.data_display_info.regs_column_count) | 124 if ((line_no * TUI_DATA_WIN->detail.data_display_info.regs_column_count) |
125 <= TUI_DATA_WIN->detail.data_display_info.regs_content_count) | 125 <= TUI_DATA_WIN->detail.data_display_info.regs_content_count) |
126 return ((line_no + 1) * | 126 return ((line_no + 1) * |
127 TUI_DATA_WIN->detail.data_display_info.regs_column_count) - | 127 TUI_DATA_WIN->detail.data_display_info.regs_column_count) - |
128 TUI_DATA_WIN->detail.data_display_info.regs_column_count; | 128 TUI_DATA_WIN->detail.data_display_info.regs_column_count; |
129 else | 129 else |
130 return (-1); | 130 return (-1); |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 /* Answer the index of the last element in line_no. If line_no is | |
135 past the register area (-1) is returned. */ | |
136 int | |
137 tui_last_reg_element_no_in_line (int line_no) | |
138 { | |
139 if ((line_no * TUI_DATA_WIN->detail.data_display_info.regs_column_count) <= | |
140 TUI_DATA_WIN->detail.data_display_info.regs_content_count) | |
141 return ((line_no + 1) * | |
142 TUI_DATA_WIN->detail.data_display_info.regs_column_count) - 1; | |
143 else | |
144 return (-1); | |
145 } | |
146 | |
147 /* Show the registers of the given group in the data window | 134 /* Show the registers of the given group in the data window |
148 and refresh the window. */ | 135 and refresh the window. */ |
149 void | 136 void |
150 tui_show_registers (struct reggroup *group) | 137 tui_show_registers (struct reggroup *group) |
151 { | 138 { |
152 enum tui_status ret = TUI_FAILURE; | 139 enum tui_status ret = TUI_FAILURE; |
153 struct tui_data_info *display_info; | 140 struct tui_data_info *display_info; |
154 | 141 |
155 /* Make sure the curses mode is enabled. */ | 142 /* Make sure the curses mode is enabled. */ |
156 tui_enable (); | 143 tui_enable (); |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 { | 754 { |
768 tui_scroll (FORWARD_SCROLL, TUI_DATA_WIN, 1); | 755 tui_scroll (FORWARD_SCROLL, TUI_DATA_WIN, 1); |
769 } | 756 } |
770 | 757 |
771 | 758 |
772 static void | 759 static void |
773 tui_scroll_regs_backward_command (char *arg, int from_tty) | 760 tui_scroll_regs_backward_command (char *arg, int from_tty) |
774 { | 761 { |
775 tui_scroll (BACKWARD_SCROLL, TUI_DATA_WIN, 1); | 762 tui_scroll (BACKWARD_SCROLL, TUI_DATA_WIN, 1); |
776 } | 763 } |
OLD | NEW |