3 * tui.h (tui_show_assembly): Declare.
4 (tui_is_window_visible): Declare.
5 * tui.c (tui_show_assembly): New function.
6 (tui_is_window_visible): New function.
7 (tui_get_command_dimension): New function.
11 * tuiWin.c (tuiRefreshAll): Use clearok to force a refresh.
15 * tui-file.c (tui_file_fputs): Use tui_puts.
19 * tuiStack.c (tuiSetLocatorInfo): Cleanup.
20 * tuiStack.h (tuiGetLocatorFilename): Declare.
21 * tuiRegs.h (tuiFirstRegElementNoInLine): Declare.
22 * tuiData.h (addToSourceWindows): Declare.
26 * tui.c (tui_change_windows): New function.
27 (tui_delete_other_windows): New function.
28 (tui_initialize_readline): Bind them to C-X 1 and C-X 2.
29 (tui_enable): Enable the keypad; call tui_update_variables.
30 (strcat_to_buf_with_fmt): Remove.
34 * tui.h: Remove old declarations, add the new ones.
35 * tui.c (tui_switch_mode): New function.
36 (tui_initialize_readline): New function.
37 (tui_enable): New function.
38 (tui_disable): New function.
39 (tuiGetLowDisassemblyAddress): Use CORE_ADDR, cleanup.
40 (tui_vSelectSourceSymtab): Remove.
41 (tuiInitWindows): Remove.
42 (_initialize_tui): Remove.
43 (_tuiReset): Keep but put arround #if 0.
47 * tuiIO.h: Remove old declarations and add the new ones.
48 * tuiIO.c: New management for curses and gdb terminal interactions.
50 (tuiTermSetup, tuiTermUnsetup): Remove, must use normal curses ops.
51 (tuiBufferGetc, tui_vStartNewLines, _updateCommandInfo): Remove.
52 (tui_owns_terminal): Remove.
53 (tui_redisplay_readline): New function.
54 (tui_puts): New function.
55 (tui_prep_terminal): New function.
56 (tui_deprep_terminal): New function.
57 (tui_getc): Rename of tuiGetc, simplify and fix.
58 (tui_setup_io): New function.
59 (tui_initialize_io): New function.
63 * tuiRegs.c (tuiDisplayRegistersFrom): Call touchwin.
64 (_tuiRegisterFormat): Reduce size of format result.
68 * tuiGeneralWin.c (boxWin): Use the tui configuration variables.
69 * tuiWin.h: Declare the new variables.
70 * tuiWin.c (_initialize_tuiWin): Create TUI configuration variables.
71 (tui_update_variables): New function.
72 (translate): New function.
73 (tui_border_kind_enums, tui_border_mode_enums): New tables.
74 (tui_border_mode_translate): New table.
75 (tui_border_kind_translate_*): New tables.
76 (tui_active_border_mode): New variables.
77 (tui_border_*): New variables.
81 * tuiWin.c (_parseScrollingArgs): Fix uninitialized variable.
82 (_makeVisibleWithNewHeight): Use TuiLineOrAddress type.
84 * tuiStack.c (tuiShowFrameInfo): Use TuiLineOrAddress type.
85 (tui_vUpdateLocatorFilename): Remove.
86 * tuiStack.h: Update prototypes.
88 * tuiSourceWin.c (tuiAddrIsDisplayed): New function.
89 (tuiLineIsDisplayed): Split for address and line.
90 (tuiUpdateSourceWindow): Use TuiLineOrAddress type.
91 (tuiUpdateSourceWindowAsIs): Likewise.
92 (tuiUpdateSourceWindowsWithAddr): Likewise.
93 (tuiUpdateSourceWindowsWithLine): Likewise.
94 (tuiHorizontalSourceScroll): Likewise.
95 (tuiSetIsExecPointAt): Likewise.
96 (tuiUpdateOnEnd): Likewise.
97 * tuiSourceWin.h: Update prototypes.
99 * tuiSource.c (tuiVerticalSourceScroll): Use TuiLineOrAddress type.
100 (tuiShowSource): Likewise.
101 (tuiVerticalSourceScroll): Likewise.
102 * tuiSource.h (tuiShowSource): Update prototype.
104 * tuiDisassem.c (tuiSetDisassemContent): Use CORE_ADDR for address.
105 (tuiShowDisassem): Use TuiLineOrAddress type.
106 (tuiShowDisassemAndUpdateSource): Likewise.
107 (tuiVerticalDisassemScroll): Likewise.
108 (tuiShowDisassemAsIs): Remove.
109 * tuiDisassem.h (tuiSetDisassemContent): Update prototype.
111 * tuiData.c (initWinInfo): Use CORE_ADDR for address.
112 (clearWinDetail): Likewise.
113 (displayableWinContentOf): Fix address conversion.
114 (tuiNextWin): Fix crash when the window is not yet created.
115 (partialWinByName): Likewise.
119 * tuiSourceWin.h: Remove unused declarations.
120 * tuiSourceWin.c (tui_vUpdateSourceWindowsWithAddr): Remove.
121 (tui_vUpdateSourceWindowsWithLine): Remove.
122 (tui_vAllSetHasBreakAt): Remove.
124 * tuiLayout.h (tui_set_layout): Declare.
125 (tui_vSetLayoutTo): Remove.
126 (tui_vAddWinToLayout): Remove.
127 * tuiLayout.c (_tuiLayout_command): Call tui_enable() to force TUI.
128 (_tuiToggleLayout_command): Remove.
129 (_tuiToggleSplitLayout_command): Remove.
130 (_tuiLayout_command): Remove.
131 (tui_vSetLayoutTo): Remove.
132 (tui_vAddWinToLayout): Remove.
134 * tuiDataWin.h (tui_vCheckDataValues): Remove.
135 * tuiDataWin.c (tui_vCheckDataValues): Remove.
139 * tuiWin.c (tuiStrDup): Remove, replaced by xstrdup.
140 (_parseScrollingArgs): Use xstrdup.
141 (_tuiScrollForward_command): Call tui_enable() to force TUI mode.
142 (_tuiScrollBackward_command): Likewise.
143 (_tuiScrollLeft_command): Likewise.
144 (_tuiScrollRight_command): Likewise.
145 (_tuiSetFocus): Likewise.
146 (_tuiSetFocus_command): Likewise.
147 (_tuiRefreshAll_command): Likewise.
148 (_tuiSetTabWidth_command): Likewise.
149 (_tuiSetWinHeight): Likewise.
150 (_tuiSetWinHeight_command): Likewise.
151 (_tuiXDBsetWinHeight): Likewise.
152 (_tui_vSetFocus): Remove.
153 (_tui_vSetWinHeight): Remove.
154 (_tui_vXDBsetWinHeight): Remove.
158 * tuiCommand.h: Remove unused declarations.
159 * tuiCommand.c (tuiDispatchCtrlChar): Fix escape sequences.
160 (tuiIncrCommandCharCountBy): Remove.
161 (tuiDecrCommandCharCountBy): Remove.
162 (tuiSetCommandCharCountTo): Remove.
163 (tuiClearCommandCharCount): Remove.
167 * tuiWin.c (_initialize_tuiWin): Always define the tui commands;
168 create the tui class help.
169 * tuiLayout.c (_initialize_tuiLayout): Always define the tui commands.
170 * tuiRegs.c (_initialize_tuiRegs): Likewise.
171 * tuiStack.c (_initialize_tuiStack): Likewise.
175 * tuiDisassem.c (tuiVerticalDisassemScroll): Use CORE_ADDR.
176 (tuiVerticalDisassemScroll): Likewise.
177 (tuiShowDisassemAndUpdateSource): Check for null symtab to
182 * tuiIO.c (_tuiHandleResizeDuringIO): Call tuiRefreshAll.
183 (tuiRead, tui_vread): Remove.
185 * tui.c (va_catch_errors, tuiDo, tuiDoAndReturnToTop): Remove.
186 (vcatch_errors, _tui_vDo): Remove.
187 * tui.h (tuiDo, tuiDoAndReturnToTop): Remove.
189 * tuiLayout.c (tuiSetLayout): Remove vcatch_errors.
190 (tui_set_layout): Rename of _tuiSetLayoutTo, public.
191 (_tuiToggleLayout_command): Merge with _tui_vToggleLayout_command.
192 (_tuiToggleSplitLayout_command): Merge with _tui_vToggleSplitLayout_command.
193 (_tuiLayout_command): Call tui_set_layout.
195 * tuiRegs.c (_tuiScrollRegsBackward_command): Call tui_scroll.
196 (_tuiScrollRegsForward_command): Likewise.
197 (_tuiShowFloat_command): Call _tui_vShowRegisters_commandSupport.
198 (_tuiShowGeneral_command): Likewise.
199 (_tuiShowSpecial_command): Likewise.
200 (_tuiToggleFloatRegs_command): Call tuiToggleFloatRegs.
201 * tuiWin.c (tui_scroll): Rename of tui_vScroll, update parameters.
202 (_tuiScrollForward_command): Call tui_scroll.
203 (_tuiScrollBackward_command): Likewise.
204 (_tuiScrollLeft_command): Likewise.
205 (_tuiScrollRight_command): Likewise.
206 (_tuiSetFocus_command): Call _tuiSetFocus.
207 (_tuiRefreshAll_command): Call tuiRefreshAll.
208 (_tuiSetWinHeight_command): Call _tuiSetWinHeight.
209 (_tuiXDBsetWinHeight_command): Call _tuiXDBsetWinHeight.
210 * tuiWin.h (tui_scroll): Rename of tui_vScroll, update parameters.
214 * tuiData.h (TuiLocatorElement): Use CORE_ADDR for address member.
215 (TuiLineOrAddress): Likewise.
216 * tuiDisassem.c (tuiGetBeginAsmAddress): Use CORE_ADDR to specify
218 (tuiSetDisassemContent): Likewise.
219 (tuiShowDisassem, tuiShowDisassemAndUpdateSource): Likewise.
220 * tuiLayout.c (_extractDisplayStartAddr): Likewise.
221 (tuiSetLayout): Likewise.
222 * tuiSourceWin.c (tuiDisplayMainFunction): Likewise.
223 (tuiUpdateSourceWindowsWithAddr): Likewise.
224 (tuiUpdateSourceWindowsWithLine): Likewise.
225 (tuiSetHasBreakAt): Likewise.
226 * tuiStack.c (tuiSetLocatorInfo): Likewise.
227 (tuiSwitchFilename): Likewise.
228 (tuiUpdateLocatorInfoFromFrame): Likewise.
229 (tuiSetLocatorContent): Likewise.
230 (tuiShowFrameInfo): Likewise.
231 * tuiDisassem.h: Update prototypes to use CORE_ADDR.
232 * tuiSourceWin.h: Likewise.
233 * tuiStack.h: Likewise.
237 * tuiWin.c: Add missing includes.
238 (_makeVisibleWithNewHeight): Fix call to find_line_pc.
239 * tuiLayout.c: Add missing includes.
240 (_initAndMakeWin): Don't put curses in echo mode.
241 (_extractDisplayStartAddr): Fix calls to find_line_pc.
242 (_tuiLayout_command): Missing ',' in warning call.
243 * tuiSourceWin.c (tuiUpdateSourceWindowsWithLine): Fix calls to
245 (tuiSetHasBreakAt): Check for null source file.
249 * tuiWin.c (_tuiSetFocus): Replace subsetCompare with subset_compare.
250 * tuiLayout.c (_tuiSetLayoutTo): Likewise.
251 * tui.c (_tui_vToggle_command): Likewise.
255 * tui-file.c: Add include of tuiIO.h, for tuiPuts_unfiltered.
259 * tuiRegs.c (tuiDisplayRegistersFrom): Set scrollok to FALSE in
260 each register window.
261 (tuiCheckRegisterValues): Use REGISTER_RAW_SIZE to obtain the size
262 of the register to check.
263 (_tuiRegValueHasChanged): Likewise.
264 (_tuiRegisterName): Use REGISTER_NAME.
265 (tui_restore_gdbout): New function.
266 (_tuiRegisterFormat): Use do_registers_info with gdb_stdout redirected
268 (START_SPECIAL_REGS): Define.
269 (_tuiGetRegisterRawValue): Use get_saved_register.
270 (_tuiDisplayRegister): Fix clearing of register window.
274 * tui-file.h (fputs_unfiltered_hook): Remove.
275 * tui-file.c (tui_file_flush): Remove fputs_unfiltered_hook.
276 (tui_file_fputs): Likewise; simplify
280 * tuiStack.c: Add missing includes.
281 (tuiShowFrameInfo): Don't crash when there is no symbol table
282 associated with the pc.
283 * tuiSource.c (_hasBreak): Check for null source file.
284 * tuiWin.c (tuiRefreshAll): Check for null winList[type].
285 (_tuiSetFocus): Check for null dataWin.
286 * tuiGeneralWin.c (refreshAll): Check for null list[type].
290 * tuiDisassem.c (tuiSetDisassemContent): Use tm_print_insn_info
291 to disassemble in the curses window.
295 * tui.h: Cleanup to avoid inclusion of curses includes.
296 (TuiGenWinInfo, TuiGenWinInfoPtr): Move from here.
297 * tuiData.h: To here; include curses includes here.
298 (setTermHeightTo): Rename of setTermHeight to follow reality.
299 (setTermWidthTo): Likewise with setTermWidth.
303 * tuiWin.c, tui.c, tuiCommand.c: Use ansi prototype.
304 tuiIO.c, tuiData.c: Likewise.
305 tuiDataWin.c, tuiDisassem.c: Likewise.
306 tuiGeneralWin.c, tuiLayout.c: Likewise.
307 tuiRegs.c, tuiSource.c: Likewise.
308 tuiSouceWin.c, tuiStack.c: Likewise.
312 * tuiWin.c, tuiWin.h, tui.c, tui.h, tuiCommand.c: Add FSF copyright.
313 tuiCommand.h, tuiIO.c, tuiIO.h, tuiData.h, tuiData.c: Likewise.
314 tuiDataWin.c, tuiDataWin.h, tuiDisassem.c, tuiDisassem.h: Likewise.
315 tuiGeneralWin.c, tuiGeneralWin.h, tuiLayout.c, tuiLayout.h: Likewise.
316 tuiRegs.c, tuiRegs.h, tuiSource.c, tuiSource.h: Likewise.
317 tuiSouceWin.c, tuiSourceWin.h, tuiStack.c, tuiStack.h: Likewise.
321 * tuiRegs.c: Use NUM_REGS, not ARCH_NUM_REGS.
325 * tui-file.h: Update/correct copyright notice.
329 * tui-file.c: Add __FILE__ and __LINE__ parameter to calls to
334 * tui-file.c, tui.c, tuiData.c, tuiLayout.c: Replace occurrences
335 of free() with xfree().
339 * tuiSourceWin.h: Eliminate use of PARAMS from this file.
343 * tuiLayout.c: Eliminate use of PARAMS from this file.
347 * tuiIO.c: Eliminate use of PARAMS from this file.
351 * tui-file.c: Include "tui.h", "tuiData.h", "tuiIO.h" and
353 (tui_file_fputs): Pass ``file'' and not ``stream'' to
354 tui_file_adjust_strbuf.
358 * tui.h: Include <ncurses.h> when available.
359 * tui.c, tuiGeneralWin.c: Do not include <curses.h>.
363 * Makefile.in: Delete.
367 * Makefile.in (distclean, maintainer-clean, realclean,
368 mostlyclean): New targets.
372 * tui-file.c, tui-file.h, tuiDisassem.c, tuiIO.c, tuiIO.h,
373 tuiRegs.c: Update to reflect rename of gdb-file / GDB_FILE to
374 ui-file / ``struct ui_file''.
378 * tui-file.c (enum streamtype, struct tui_stream, tui_file_new,
379 tui_file_delete, tui_fileopen, tui_sfileopen, tui_file_isatty,
380 tui_file_rewind, tui_file_put, tui_file_fputs,
381 tui_file_get_strbuf, tui_file_adjust_strbuf, tui_file_flush,
382 fputs_unfiltered_hook): Move to here from ../utils.c
384 * tui-file.h, tui-file.c: New files.
388 * tuiRegs.c (_tuiRegisterFormat), tuiDisassem.c
389 (tuiSetDisassemContent): Replace gdb_file_init_astring with
390 tui_sfileopen. Replace gdb_file_get_strbuf with
395 * tuiRegs.c (_tuiRegisterFormat), tuiDisassem.c
396 (tuiSetDisassemContent): Repace gdb_file_deallocate with
397 gdb_file_delete. Replace gdb_file_init_astring with tui_sfileopen.
401 * tuiSource.c: Include "source.h".
402 (open_source_file, find_source_lines): Delete declarations.
406 * tui.h: Include stdarg.h instead of varargs.h if we're on an ISO Cish
415 changes originally made by HP; HP did not create ChangeLog
418 * Makefile.in: New file; we're merging HP's changes into GDB, and
419 we've moved the TUI files into a subdirectory, so we need a new
423 #include <term.h>, if we have it, to get declarations for
424 the termcap functions on Solaris.
425 (tgoto): Add external K&R declaration for this; Solaris doesn't
426 bother to actually declare it in their header files.
427 (_tuiReset): Ignore the #definition of TIOCGETC if USG is defined;
428 we'd rather use the USG mechanisms than the Berkeley mechanisms
429 (TIOCGETC is one of the Berkeley terminal control ioctls).
430 Apologies if this causes trouble later; this should all be handled
432 (strcat_to_buf, strcat_to_buf_with_fmt): New functions, moved here
434 (tuiFree): replace safe_free with free.
435 (strcat_to_buf): new function, copied from utils.c.
436 (tuiInit): Add ignored `argv0' argument, to match the type that
437 init_ui_hook expects; updated declaration. Call the
438 initialize_tui_files function constructed above. Initialize
440 (tuiInitWindows): Call tuiSetLocatorContent, to get the first
441 element of the locator window's content allocated. This seems
442 wrong, because it must have been initialized somehow in HP's
443 sources, and we should do it the same way now. But we do get
444 further before it segfaults. [Postscript: HP didn't bother to
445 initialize it; they compile
446 (va_catch_errors, vcatch_errors): Functions moved here from
447 ../utils.c in HP's sources. They're not used anywhere else.
448 (xdb_style): Delete this variable, and remove all references to
449 it. It's always true.
450 (tuiInit, _tui_vDo): References removed.
452 * tui.h: Add prototypes.
453 Don't #include "gendefs.h"; it's only used in the TUI.
454 Integrate its contents into this file:
455 #include <ansidecl.h> here.
456 (Opaque, OpaqueFuncPtr): Typedefs moved to here.
458 * tuiCommand.c: #include "defs.h", so we get the appropriate
459 definition of GDB_FILE.
462 (freeWindow): replace safe_free with free.
463 (tui_version): don't define it here; it's defined in main.c now.
466 (tuiSetDisassemContent): Call strcat_address_numeric instead of
467 strcat_address. Simplify the control structure. Use predefined
468 GDB function to print asm inst address. Use GDB_FILE to collect
472 (tgoto): Add external K&R declaration for this here too.
473 (tuiGetc, tuiTermSetup, tuiTermUnsetup): Same.
474 (tuiPuts_unfiltered): change FILE to GDB_FILE.
475 (tui_tputs): fix prototype for 3rd argument.
477 * tuiIO.h (tuiPuts_unfiltered): change declaration.
480 (_tuiSetLayoutTo): for displaying registers, hook up the HP code
481 that decides which registers to display (i.e. single precision
482 float, double precision float, general, special). Previously,
483 only handled TUI_GENERAL_REGS. Now that the code is hooked up,
484 compiling with -z poses a problem. When the first layout command
485 is 'layout regs', dataWin->detail is a NULL pointer, and gdb
488 * tuiLayout.c (_tuiSetLayoutTo): replace safe_free with free.
490 * tuiRegs.c #include "defs.h" earlier, to avoid problems in
491 <stdarg.h>. No idea exactly what's conflicting with what, but the
493 (_tuiRegisterFormat): Change so that function creates a GDB_FILE
494 object, calls pa_do_strcat_registers_info, copies the register
495 info into a buffer, and deallocates the GDB_FILE object. Remove
496 some code that is not executed. Also, call to
497 pa_do_strcat_registers_info has an additional parameter,
498 precision. This code requires some new per-target functions that
499 we don't want to merge. Dyke it out, with #ifdef
500 TUI_EXTENDED_FORMATTERS.
501 (_tuiSetSpecialRegsContent): this function was ifdefed out.
503 (_tuiSetGeneralAndSpecialRegsContent): this function was ifdefed
505 (IS_64BIT): Just define this to be zero; we're not merging in the
507 (tuiShowRegisters): Comment out all references to the "special"
508 regs; we don't have a distinction between the "special" and
509 "non-special" regs in most of our machine descriptions. This code
510 is PA-specific in other ways as well, and needs to be redesigned
511 to be portable to other processors.
513 * tuiWin.c: #include <string.h>, to get a declaration for
516 * tui.c, tuiCommand.c, tuiData.c, tuiDataWin.c, tuiDisassem.c,
517 tuiGeneralWin.c, tuiIO.c, tuiLayout.c, tuiRegs.c, tuiSource.c,
518 tuiSourceWin.c, tuiStack.c, tuiWin.c: New files (from HP). Changed
519 bool to int throughout. Re-indented, GNU style.
521 * tui.h, tuiCommand.h, tuiData.h, tuiDataWin.h, tuiDisassem.h,
522 tuiGeneralWin.h, tuiIO.h, tuiLayout.h, tuiRegs.h, tuiSource.h,
523 tuiSourceWin.h, tuiStack.h, tuiWin.h: new files (from HP).
524 Changed bool to int throughout.