GNU Binutils with patches for OS216
Révision | e555083f95748276ab7a229c46aa8d5c0ef9fbc4 (tree) |
---|---|
l'heure | 2020-07-02 12:21:13 |
Auteur | Tom Tromey <tom@trom...> |
Commiter | Tom Tromey |
Move some code out of tui-data.h
This moves some code out of tui-data.h, to more closely related
places. Some unused forward declarations are also removed.
gdb/ChangeLog
2020-07-01 Tom Tromey <tom@tromey.com>
* tui/tui-stack.c (SINGLE_KEY): Move from tui-data.h
* tui/tui-winsource.h (enum tui_line_or_address_kind)
(struct tui_line_or_address): Move from tui-data.h.
* tui/tui-win.c (DEFAULT_TAB_LEN): Move from tui-data.h.
* tui/tui-data.h (DEFAULT_TAB_LEN): Move to tui-win.c.
(tui_cmd_window, tui_source_window_base, tui_source_window)
(tui_disasm_window): Don't declare.
(enum tui_line_or_address_kind, struct tui_line_or_address): Move
to tui-winsource.h.
(SINGLE_KEY): Move to tui-stack.c.
@@ -1,5 +1,18 @@ | ||
1 | 1 | 2020-07-01 Tom Tromey <tom@tromey.com> |
2 | 2 | |
3 | + * tui/tui-stack.c (SINGLE_KEY): Move from tui-data.h | |
4 | + * tui/tui-winsource.h (enum tui_line_or_address_kind) | |
5 | + (struct tui_line_or_address): Move from tui-data.h. | |
6 | + * tui/tui-win.c (DEFAULT_TAB_LEN): Move from tui-data.h. | |
7 | + * tui/tui-data.h (DEFAULT_TAB_LEN): Move to tui-win.c. | |
8 | + (tui_cmd_window, tui_source_window_base, tui_source_window) | |
9 | + (tui_disasm_window): Don't declare. | |
10 | + (enum tui_line_or_address_kind, struct tui_line_or_address): Move | |
11 | + to tui-winsource.h. | |
12 | + (SINGLE_KEY): Move to tui-stack.c. | |
13 | + | |
14 | +2020-07-01 Tom Tromey <tom@tromey.com> | |
15 | + | |
3 | 16 | * tui/tui-regs.h (struct tui_data_item_window) <content>: Now a |
4 | 17 | std::string. |
5 | 18 | * tui/tui-regs.c (class tab_expansion_file): New. |
@@ -26,11 +26,6 @@ | ||
26 | 26 | #include "gdb_curses.h" /* For WINDOW. */ |
27 | 27 | #include "observable.h" |
28 | 28 | |
29 | -struct tui_cmd_window; | |
30 | -struct tui_source_window_base; | |
31 | -struct tui_source_window; | |
32 | -struct tui_disasm_window; | |
33 | - | |
34 | 29 | /* A deleter that calls delwin. */ |
35 | 30 | struct curses_deleter |
36 | 31 | { |
@@ -125,7 +120,6 @@ public: | ||
125 | 120 | }; |
126 | 121 | |
127 | 122 | /* Constant definitions. */ |
128 | -#define DEFAULT_TAB_LEN 8 | |
129 | 123 | #define SRC_NAME "src" |
130 | 124 | #define CMD_NAME "cmd" |
131 | 125 | #define DATA_NAME "regs" |
@@ -133,26 +127,6 @@ public: | ||
133 | 127 | #define STATUS_NAME "status" |
134 | 128 | #define MIN_WIN_HEIGHT 3 |
135 | 129 | |
136 | -/* Strings to display in the TUI status line. */ | |
137 | -#define SINGLE_KEY "(SingleKey)" | |
138 | - | |
139 | -enum tui_line_or_address_kind | |
140 | -{ | |
141 | - LOA_LINE, | |
142 | - LOA_ADDRESS | |
143 | -}; | |
144 | - | |
145 | -/* Structure describing source line or line address. */ | |
146 | -struct tui_line_or_address | |
147 | -{ | |
148 | - enum tui_line_or_address_kind loa; | |
149 | - union | |
150 | - { | |
151 | - int line_no; | |
152 | - CORE_ADDR addr; | |
153 | - } u; | |
154 | -}; | |
155 | - | |
156 | 130 | /* This defines information about each logical window. */ |
157 | 131 | struct tui_win_info : public tui_gen_win_info |
158 | 132 | { |
@@ -43,6 +43,9 @@ | ||
43 | 43 | #define LINE_PREFIX "L" |
44 | 44 | #define PC_PREFIX "PC: " |
45 | 45 | |
46 | +/* Strings to display in the TUI status line. */ | |
47 | +#define SINGLE_KEY "(SingleKey)" | |
48 | + | |
46 | 49 | /* Minimum/Maximum length of some fields displayed in the TUI status |
47 | 50 | line. */ |
48 | 51 | #define MIN_LINE_WIDTH 4 /* Use at least 4 digits for line |
@@ -753,6 +753,8 @@ tui_refresh_all_command (const char *arg, int from_tty) | ||
753 | 753 | tui_refresh_all_win (); |
754 | 754 | } |
755 | 755 | |
756 | +#define DEFAULT_TAB_LEN 8 | |
757 | + | |
756 | 758 | /* The tab width that should be used by the TUI. */ |
757 | 759 | |
758 | 760 | unsigned int tui_tab_width = DEFAULT_TAB_LEN; |
@@ -25,6 +25,23 @@ | ||
25 | 25 | #include "tui/tui-data.h" |
26 | 26 | #include "symtab.h" |
27 | 27 | |
28 | +enum tui_line_or_address_kind | |
29 | +{ | |
30 | + LOA_LINE, | |
31 | + LOA_ADDRESS | |
32 | +}; | |
33 | + | |
34 | +/* Structure describing source line or line address. */ | |
35 | +struct tui_line_or_address | |
36 | +{ | |
37 | + enum tui_line_or_address_kind loa; | |
38 | + union | |
39 | + { | |
40 | + int line_no; | |
41 | + CORE_ADDR addr; | |
42 | + } u; | |
43 | +}; | |
44 | + | |
28 | 45 | /* Flags to tell what kind of breakpoint is at current line. */ |
29 | 46 | enum tui_bp_flag |
30 | 47 | { |