3 * tuiIO.c (tui_prep_terminal): Save the prompt registered in readline.
4 (tui_redisplay_readline): Use the last saved prompt.
5 (tui_rl_saved_prompt): New.
10 * tuiWin.c (ACS_LRCORNER, ACS_LLCORNER, ACS_ULCORNER, ACS_URCORNER,
11 ACS_HLINE, ACS_VLINE): Define if they don't exist.
16 * tuiIO.c (tui_initialize_io): Use setvbuf since this is portable.
20 * tui-hooks.c (selected_frame_level_changed_hook): Use the one
21 exported from frame.h.
25 * tui.c (tui_show_source): Don't access current_source_symtab, use
26 accessor function instead. Include source.h and symtab.h
27 * tuiDisassem.c (tuiShowDisassemAndUpdateSource,
28 tuiVerticalDisassemScroll): Use accessor functions for current
29 source line and symtab. Include source.h.
30 * tuiLayout.c (_extractDisplayStartAddr): Use accessor functions
31 for current source line and symtab. Include source.h.
32 * tuiWin.c (_makeVisibleWithNewHeight): Ditto.
33 * tuiSourceWin.c (tuiUpdateSourceWindowAsIs,
34 tuiHorizontalSourceScroll): Ditto.
35 * tuiSource.c (tuiVerticalSourceScroll): Ditto.
39 * tui.c (tui_rl_switch_mode): Remove unecessary TUI switch printfs.
40 (tui_initialize_readline): Allow to use space to leave SingleKey
41 to enter one gdb command.
42 (tui_enable): Restore the TUI keymap when we are back to TUI.
43 (tui_disable): Restore normal keymap when leaving TUI.
44 * tuiIO.c (tui_redisplay_readline): Restore the SingleKey mode
45 when the buffer becomes empty and we are in tui_one_command_mode.
49 * tuiIO.c (tui_setup_io): rl_already_prompted must be cleared
50 when leaving TUI mode so that gdb prompt is displayed.
54 * tuiStack.c (tui_make_status_line): Make sure the local buffer
55 is large enough to hold the complete line.
59 * tui-hooks.c (tui_event_loop): New function.
60 (tui_command_loop): New function to override gdb loop and make sure
61 uiout is set according to TUI mode.
62 (tui_command_loop): Install the specific TUI command hook.
63 * tuiIO.c (tui_initialize_io): Initialize tui_old_uiout.
64 (tui_uiout, tui_old_uiout): Make public.
65 * tuiIO.h (tui_uiout, tui_old_uiout): Declare.
69 * tuiIO.c (tui_putc): New function to print one character.
70 (printable_part): New function from readline/complete.c.
71 (PUTX): New macro, likewise.
72 (print_filename): New function, likewise.
73 (get_y_or_n): New function, likewise and adapted for TUI.
74 (tui_rl_display_match_list): New function from readline/complete.c
75 and writes on TUI command window.
76 (tui_setup_io): Install or remove the readline hook
77 rl_completion_display_matches_hook so that completion is written
78 directly in TUI command window instead of in the TUI pipe.
79 (tui_initialize_io): Use #ifdef TUI_USE_PIPE_FOR_READLINE for the
81 (tui_getc): Likewise for call to tui_readline_output.
82 (tui_readline_output): Likewise for function.
83 * tui.c (tui_rl_startup_hook): Always take care of gdb prompt.
87 * tuiWin.c (_newHeightOk): Fix compilation warnings.
91 * tuiWin.c (_tuiAllWindowsInfo): Don't crash if the window
96 * tui-out.c (tui_out_new): Clear start_of_line.
97 * tuiSource.c (tuiVerticalSourceScroll): Use print_source_lines
98 to update the current source line.
102 * tui-hooks.c (tui_detach_hook): New hook to know when a process dies.
103 (tui_install_hooks): Install it.
104 (tui_remove_hooks): Remove it.
108 * tuiData.h (FILE_PREFIX): Don't define.
109 (blankStr, locationStr, breakStr): Don't declare.
110 (breakLocationStr, nullStr, historyLimit, setHistoryLimitTo): Likewise.
111 (displayableWinContentOf, displayableWinContentAt): Likewise.
112 (winElementHeight, winByName, freeAllWindows): Likewise.
114 * tuiData.c (blankStr, locationStr, breakStr): Remove.
115 (breakLocationStr, nullStr, historyLimit, setHistoryLimitTo): Remove.
116 (displayableWinContentOf, displayableWinContentAt): Remove.
117 (winElementHeight, winByName, freeAllWindows): Remove.
121 * tuiStack.c (tui_make_status_line): New function to create the
123 (tuiShowLocatorContent): Use it instead of displayableWinContentAt.
124 * tuiData.h (PROC_PREFIX): Use "In:" to reduce length of prefix.
125 (PC_PREFIX): Use upper case.
126 (SINGLE_KEY, MIN_LINE_WIDTH, MIN_PROC_WIDTH): Define.
127 (MAX_TARGET_WIDTH, MAX_PID_WIDTH): Define.
131 * tuiSourceWin.h (tuiUpdateAllExecInfos): Don't declare.
132 (tuiClearAllExecInfosContent): Likewise.
133 (tuiEraseAllExecInfosContent): Ditto.
134 (tuiUpdateSourceWindowsFromLocator): Ditto.
135 * tuiSourceWin.c (tuiUpdateAllExecInfos): Remove.
136 * tui.h (tui_vCheckDataValues): Don't declare.
137 (tui_vStartNewLines, tui_vAllSetHasBreakAt): Likewise.
138 (tui_vUpdateLocatorFilename, tui_vUpdateSourceWindowsWithAddr): Ditto.
139 (tui_vShowFrameInfo): Ditto.
143 * tui.c (tui_commands): Table of single key commands.
144 (tui_rl_command_key): New function to execute gdb command.
145 (tui_rl_command_mode): New function to temporarily leave SingleKey.
146 (tui_rl_next_keymap): New function to enter/leave the SingleKey mode.
147 (tui_rl_startup_hook): New function to avoid prompt display by
149 (tui_set_key_mode): New function to set the key mode and install
151 (tui_initialize_readline): Create TUI SingleKey readline map.
152 (tui_enable): Install rl_startup_hook.
153 (tui_disable): Remove it.
154 * tui.h (enum tui_key_mode): Declare.
155 (tui_set_key_mode, tui_current_key_mode): Declare.
156 * tuiIO.c (tui_redisplay_readline): Don't display the prompt in
158 * tuiIO.h (tui_redisplay_readline): Declare.
162 * tuiSourceWin.c (tuiSetIsExecPointAt): Redraw the previous and
167 * tuiSource.c (tuiSetSourceContent): Remove old breakpoint code.
169 (tuiShowSource): Fix comment indentation.
170 (tuiSourceIsDisplayed): Likewise.
171 (tuiVerticalSourceScroll): Likewise.
175 * tuiSourceWin.h (tui_update_all_breakpoint_info): Declare.
176 (tui_update_breakpoint_info): Declare.
177 (tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove.
179 * tuiSourceWin.c (tuiUpdateSourceWindowAsIs): Update breakpoint
180 information using tui_update_breakpoint_info.
181 (tui_update_all_breakpoint_info): New function to refresh all
183 (tui_update_breakpoint_info): New function to recompute the status
184 of exec info window from breakpoints.
185 (tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove.
186 (tuiSetExecInfoContent): Use the exec info flags computed by
187 tui_update_breakpoint_info to display a short status about breakpoints.
189 * tuiData.h (TuiExecInfoContent): New for exec info string.
190 (TuiWhichElement): Use it.
191 (TUI_BP_ENABLED, TUI_BP_DISABLED, TUI_BP_HIT): New defines.
192 (TUI_BP_CONDITIONAL, TUI_BP_HARDWARE): New defines.
193 (TUI_BP_HIT_POS, TUI_BP_BREAK_POS, TUI_EXEC_POS): Likewise.
194 (TUI_EXECINFO_SIZE): Likewise.
195 * tuiData.c (initContentElement): Clear exec info string.
197 * tui-hooks.c (get_breakpoint): Remove.
198 (tui_event_create_breakpoint): Call tui_update_all_breakpoint_info.
199 (tui_event_delete_breakpoint): Likewise.
200 (tui_event_modify_breakpoint): Likewise.
204 * tui.c (tuiGetLowDisassemblyAddress): Moved from here.
205 * tuiDisassem.c (tuiGetLowDisassemblyAddress): To here, and use
206 tui_find_disassembly_address to find the starting address of
211 * tuiDisassem.c (tui_disassemble): New function to disassemble
212 several lines in a buffer.
213 (tui_find_disassembly_address): New function to search backward
214 or forward a disassembly line.
215 (tuiSetDisassemContent): Use tui_disassemble to obtain the real
216 content and format it in the window.
217 (tuiShowDisassemAndUpdateSource): Remove unused locals.
218 (tuiVerticalDisassemScroll): Use tui_find_disassembly_address to
219 obtain the address to disassemble for the scrolling.
220 * tuiDisassem.h (tuiGetBeginAsmAddress): Update.
221 * tuiSourceWin.c (tuiUpdateSourceWindowAsIs): Don't pass symtab.
225 * tuiIO.c (CTRL_CHAR): Redefine and use readline 4.3 definition.
230 * tui.c (tui_disable): Update gdb's knowledge of its terminal
231 using target_terminal_save_ours.
232 (tui_enable): Likewise.
236 * tui.c (tui_rl_switch_mode): Renames tui_switch_mode.
237 (tui_rl_change_windows): Renames tui_change_windows.
238 (tui_rl_delete_other_windows): Renames tui_delete_other_windows.
239 (tui_initialize_readline): Update.
243 * tuiDisassem.c (tuiSetDisassemContent): Use breakpoint_here_p.
248 * tuiDisassem.c (tuiGetBeginAsmAddress): Use lookup_minimal_symbol
249 to find symbol address.
253 * tuiSourceWin.c (tui_display_main): Rename from tuiDisplayMainFunction
254 and use tuiGetBeginAsmAddress.
255 * tuiSourceWin.h (tui_display_main): Declare.
256 * tui.h (tuiDisplayMainFunction): Remove.
257 * tui-hooks.c (tui_new_objfile_hook): Update.
261 * tuiSource.h (m_tuiShowSourceAsIs): Remove macro.
262 (tuiShowSourceAsIs): Don't declare.
266 * tui-hooks.c (tui_selected_frame_level_changed_hook): Always update
271 * tuiStack.c (tuiSetLocatorContent): Remove.
272 (tuiUpdateLocatorInfoFromFrame): Remove.
273 (tui_set_locator_info): Allocate the content buffer if necessary.
274 (tui_set_locator_filename): Call tui_set_locator_info directly.
275 (tuiShowFrameInfo): Likewise and use find_pc_line instead of
280 * tuiSourceWin.c (tuiDisplayMainFunction): Update to use
281 tuiUpdateLocatorFilename.
282 * tuiStack.c (tuiSetLocatorInfo): Make it static.
283 (tuiSetLocatorContent): Likewise.
284 (tuiUpdateLocatorInfoFromFrame): Likewise.
285 (tuiSwitchFilename): Remove.
286 (tui_set_locator_filename): New function
287 (tui_set_locator_info): Rename from tuiSetLocatorInfo to GNU-ify;
288 use tui_set_locator_filename to record the filename.
289 (tuiUpdateLocatorFilename): Likewise.
290 (tuiUpdateLocatorInfoFromFrame): Update.
291 (tuiSetLocatorContent): Likewise.
292 * tuiStack.h (tuiClearLocatorContent): Don't declare.
293 (tuiSetLocatorInfo, tuiSetLocatorContent): Likewise.
294 (tuiUpdateLocatorInfoFromFrame, tuiSwitchFilename): Likewise.
298 * tuiSourceWin.c (tuiSetHasBreakAt): Use filename for breakpoint
300 * tuiSource.c (tuiSetSourceContent): Set window title and filename.
301 * tuiGeneralWin.c (boxWin): Print optional title on top of window.
302 * tuiData.h (TuiSourceInfo): Add filename member.
303 (TuiGenWinInfo): Add title member.
304 * tuiData.c (initGenericPart): Clear title.
305 (freeWindow): Free title and filename; remove unused locals.
306 (initWinInfo): Clear filename.
307 (tuiDelWindow): Free it; remove unused locals.
311 * tuiStack.h (tuiGetLocatorFilename): Don't declare.
312 (tuiUpdateLocatorDisplay): Likewise.
313 * tuiStack.c (tuiGetLocatorFilename): Remove.
314 (tuiShowFrameInfo): Use tuiSetLocatorContent and tuiShowLocatorContent
315 instead of tuiUpdateLocatorDisplay.
316 (tuiUpdateLocatorDisplay): Remove.
320 * tuiStack.h (tuiClearLocatorDisplay): Don't declare.
321 * tuiStack.c (tuiClearLocatorDisplay): Remove.
322 (tuiShowLocatorContent): Use wclrtoeol to clear end of status line.
323 (tuiUpdateLocatorDisplay): Don't call tuiClearLocatorDisplay.
327 * tuiStack.c (tui_get_function_from_frame): Rename from
328 _getFuncNameFromFrame; use print_address_symbolic to get symbolic
330 (tuiUpdateLocatorInfoFromFrame): Update.
334 * tuiRegs.c (tuiDisplayRegistersFrom): Remove unused locals.
335 (_tuiRegisterFormat, _tuiSetSpecialRegsContent): Likewise.
336 (_tuiSetGeneralAndSpecialRegsContent): Likewise.
337 (_tuiSetFloatRegsContent): Likewise.
338 (_tuiRegisterName): Return a const char*.
339 * tuiData.h (_TuiDataElement): Use const char* for name.
343 * tuiSourceWin.h (tuiEraseAllSourceContent): Don't declare.
344 (tuiShowAllExecInfosContent): Likewise.
345 * tuiSourceWin.c (tuiEraseAllSourceContent): Remove.
346 (tuiShowAllExecInfosContent): Remove.
347 (tuiAllocSourceBuffer): Remove unused locals.
351 * tuiStack.c (tui_update_command): Rename _tuiUpdateLocation_command
352 to follow other gdb's command names; use execute_command; cleanup.
353 (_initialize_tuiStack): Update.
357 * tuiWin.h (tui_update_gdb_sizes): Declare.
361 * tui.c (strcat_to_buf): Use const char* for source item.
362 (tui_enable): Update the windows if there is a selected frame.
363 * tui.h (strcat_to_buf): Update prototype.
364 (strcat_to_buf_with_fmt): Remove.
368 * tuiWin.c (tui_update_gdb_sizes): New function to tell gdb what
369 is the size of command window.
370 (tuiResizeAll): Call it instead of init_page_info.
371 * tui.c (tui_enable): Call it to resize to TUI command window.
372 (tui_disable): Likewise for plain screen.
376 * tui.c (tui_enable): Use tuiSetLayout instead of showLayout and
377 use tuiShowFrameInfo instead of tuiSetLocatorContent.
378 * tuiLayout.h (showLayout): Remove.
379 * tuiLayout.c (_showSourceOrDisassemAndCommand): Remove unused locals.
380 (_showSourceDisassemCommand): Likewise.
381 (showLayout): Make it static.
382 (lastLayout): Remove.
386 * tuiSourceWin.c (tui_show_source_line): New function.
387 (tuiShowSourceContent): Call it and avoid clearing the window before
389 (tuiClearAllSourceWinsContent): Remove.
390 * tuiSourceWin.h (tuiClearAllSourceWinsContent): Don't declare.
391 * tuiWin.h (tuiClearWinFocus, tuiClearWinFocusFrom): Don't declare.
392 * tuiWin.c (tuiClearWinFocus, tuiClearWinFocusFrom): Remove.
393 (tuiRefreshAll): Don't clear the window.
394 (_makeVisibleWithNewHeight): Don't clear locator line.
395 (tuiResizeAll): Remove unused locals.
396 (_tuiAdjustWinHeights): Likewise.
397 (_makeInvisibleAndSetNewHeight): Likewise.
398 (_newHeightOk): Likewise.
399 * tuiLayout.c (showLayout): Don't clear source windows.
400 (tuiSetLayout): Don't clear the window.
401 (_initAndMakeWin): Likewise for status line.
402 * tuiGeneralWin.c (makeVisible): Don't clear or refresh the window.
403 (makeWindow): Likewise.
404 (tuiClearWin): Remove.
405 * tuiGeneralWin.h (tuiClearWin): Don't declare.
409 * tuiSourceWin.c (tuiSrcWinIsDisplayed): Remove.
410 (tuiAsmWinIsDisplayed): Remove.
411 (tuiShowAllSourceWinsContent): Remove.
412 (tuiUpdateOnEnd): Remove.
413 * tuiGeneralWin.c (scrollWinForward): Remove.
414 (scrollWinBackward): Remove.
415 (_winResize): Don't declare.
416 * tui.h (tuiUpdateOnEnd): Don't declare.
417 (vcatch_errors, va_catch_errors): Likewise.
418 * tuiSourceWin.h (tuiUpdateOnEnd): Likewise.
419 (tuiShowAllSourceWinsContent): Likewise.
420 * tuiGeneralWin.h (scrollWinForward): Likewise.
421 (scrollWinBackward): Likewise.
425 * tuiRegs.c (_tuiRegisterFormat): Use gdbarch_print_registers_info.
430 * tui.c: Disable <termio.h> include.
434 * tui-out.c (XMALLOC): Delete macro. Update copyright.
438 * tui-hooks.c: Add FIXME to explain true/false problem. Update
440 * tui.c, tuiCommand.c, tuiData.c, tuiDataWin.c: Ditto.
441 * tuiDisassem.c, tuiGeneralWin.c, tuiIO.c, tuiLayout.c: Ditto.
442 * tuiRegs.c, tuiSource.c, tuiSourceWin.c, tuiStack.c: Ditto.
446 * tui-hooks.c: Include <curses.h> before "bfd.h".
448 * tuiCommand.c: Likewise.
449 * tuiData.c: Likewise.
450 * tuiDataWin.c: Likewise.
451 * tuiDisassem.c: Likewise.
452 * tuiGeneralWin.c: Likewise.
454 * tuiLayout.c: Likewise.
455 * tuiRegs.c: Likewise.
456 * tuiSource.c: Likewise.
457 * tuiSourceWin.c: Likewise.
458 * tuiStack.c: Likewise.
459 * tuiWin.c: Likewise.
463 * tuiWin.c (_initialize_tuiWin): Replace NO_FUNCTION with NULL.
467 * tuiDisassem.c: Include "value.h".
468 * tuiSourceWin.c: Ditto.
472 * tuiLayout.h (tui_set_layout): Don't declare.
473 * tui.h (tui_vAddWinToLayout): Don't declare.
474 (tui_vSetLayoutTo): Likewise.
475 (tui_set_layout): Declare.
479 * tuiSourceWin.c: Use disp_del instead of del.
481 * tuiSource.c: Use disp_del instead of del.
483 * tuiDisassem.c: Use disp_del instead of del.
487 * tui.c (tui_enable): Remove call to terminal_save_ours().
488 (tui_disable): Likewise.
492 * tuiWin.c (_initialize_tuiWin): Use specific tui prefix for
493 set/show configuration variables.
494 (show_tui_cmd): New function.
495 (set_tui_cmd): New function.
499 * tui-hooks.c: New file, gdb hooks for tui.
500 * tui-out.c: New file, image copied from cli-out.c.
501 (tui_field_int): Identify "line" fields and keep track of them.
502 (tui_field_string): Likewise for "file".
503 (tui_out_new): Use flags = 0 to avoid printing the sources.
507 * tuiIO.c (tui_cont_sig): Update cursor position on the screen to
508 leave it in the command window.
509 (tui_redisplay_readline): Save cursor position to restore the
510 cursor after we go back from background.
511 * tuiData.h (TuiCommandInfo): Add start_line member.
515 * tuiStack.c (tuiUpdateLocatorFilename): Use const char*.
516 * tuiStack.h (tuiUpdateLocatorFilename): Update prototype.
517 * tuiWin.c (_initialize_tuiWin): Don't cast table of enum in calls
519 * tui.c (tui_show_source): New function.
520 (tuiGetLowDisassemblyAddress): Use CORE_ADDR for newLow.
521 (tui_switch_mode): Prep or deprep readline terminal;
522 make sure the \n we return does not redo the last command.
523 * tui.h (tui_show_source): Declare.
524 (tui_out_new, tui_install_hooks, tui_remove_hooks): Likewise.
525 (tui_active, tui_initialize_io, tui_initialize_readline): Likewise.
529 * tuiIO.c (tui_initialize_io): Install tui_cont_sig signal handler
530 if SIGCONT is defined.
531 (tui_cont_sig): New function when SIGCONT is defined.
532 (tui_setup_io): Save tty setting to restore by SIGCONT.
536 * tui.h (tui_show_assembly): Declare.
537 (tui_is_window_visible): Declare.
538 * tui.c (tui_show_assembly): New function.
539 (tui_is_window_visible): New function.
540 (tui_get_command_dimension): New function.
544 * tuiWin.c (tuiRefreshAll): Use clearok to force a refresh.
548 * tui-file.c (tui_file_fputs): Use tui_puts.
552 * tuiStack.c (tuiSetLocatorInfo): Cleanup.
553 * tuiStack.h (tuiGetLocatorFilename): Declare.
554 * tuiRegs.h (tuiFirstRegElementNoInLine): Declare.
555 * tuiData.h (addToSourceWindows): Declare.
559 * tui.c (tui_change_windows): New function.
560 (tui_delete_other_windows): New function.
561 (tui_initialize_readline): Bind them to C-X 1 and C-X 2.
562 (tui_enable): Enable the keypad; call tui_update_variables.
563 (strcat_to_buf_with_fmt): Remove.
567 * tui.h: Remove old declarations, add the new ones.
568 * tui.c (tui_switch_mode): New function.
569 (tui_initialize_readline): New function.
570 (tui_enable): New function.
571 (tui_disable): New function.
572 (tuiGetLowDisassemblyAddress): Use CORE_ADDR, cleanup.
573 (tui_vSelectSourceSymtab): Remove.
574 (tuiInitWindows): Remove.
575 (_initialize_tui): Remove.
576 (_tuiReset): Keep but put arround #if 0.
580 * tuiIO.h: Remove old declarations and add the new ones.
581 * tuiIO.c: New management for curses and gdb terminal interactions.
583 (tuiTermSetup, tuiTermUnsetup): Remove, must use normal curses ops.
584 (tuiBufferGetc, tui_vStartNewLines, _updateCommandInfo): Remove.
585 (tui_owns_terminal): Remove.
586 (tui_redisplay_readline): New function.
587 (tui_puts): New function.
588 (tui_prep_terminal): New function.
589 (tui_deprep_terminal): New function.
590 (tui_getc): Rename of tuiGetc, simplify and fix.
591 (tui_setup_io): New function.
592 (tui_initialize_io): New function.
596 * tuiRegs.c (tuiDisplayRegistersFrom): Call touchwin.
597 (_tuiRegisterFormat): Reduce size of format result.
601 * tuiGeneralWin.c (boxWin): Use the tui configuration variables.
602 * tuiWin.h: Declare the new variables.
603 * tuiWin.c (_initialize_tuiWin): Create TUI configuration variables.
604 (tui_update_variables): New function.
605 (translate): New function.
606 (tui_border_kind_enums, tui_border_mode_enums): New tables.
607 (tui_border_mode_translate): New table.
608 (tui_border_kind_translate_*): New tables.
609 (tui_active_border_mode): New variables.
610 (tui_border_*): New variables.
614 * tuiWin.c (_parseScrollingArgs): Fix uninitialized variable.
615 (_makeVisibleWithNewHeight): Use TuiLineOrAddress type.
617 * tuiStack.c (tuiShowFrameInfo): Use TuiLineOrAddress type.
618 (tui_vUpdateLocatorFilename): Remove.
619 * tuiStack.h: Update prototypes.
621 * tuiSourceWin.c (tuiAddrIsDisplayed): New function.
622 (tuiLineIsDisplayed): Split for address and line.
623 (tuiUpdateSourceWindow): Use TuiLineOrAddress type.
624 (tuiUpdateSourceWindowAsIs): Likewise.
625 (tuiUpdateSourceWindowsWithAddr): Likewise.
626 (tuiUpdateSourceWindowsWithLine): Likewise.
627 (tuiHorizontalSourceScroll): Likewise.
628 (tuiSetIsExecPointAt): Likewise.
629 (tuiUpdateOnEnd): Likewise.
630 * tuiSourceWin.h: Update prototypes.
632 * tuiSource.c (tuiVerticalSourceScroll): Use TuiLineOrAddress type.
633 (tuiShowSource): Likewise.
634 (tuiVerticalSourceScroll): Likewise.
635 * tuiSource.h (tuiShowSource): Update prototype.
637 * tuiDisassem.c (tuiSetDisassemContent): Use CORE_ADDR for address.
638 (tuiShowDisassem): Use TuiLineOrAddress type.
639 (tuiShowDisassemAndUpdateSource): Likewise.
640 (tuiVerticalDisassemScroll): Likewise.
641 (tuiShowDisassemAsIs): Remove.
642 * tuiDisassem.h (tuiSetDisassemContent): Update prototype.
644 * tuiData.c (initWinInfo): Use CORE_ADDR for address.
645 (clearWinDetail): Likewise.
646 (displayableWinContentOf): Fix address conversion.
647 (tuiNextWin): Fix crash when the window is not yet created.
648 (partialWinByName): Likewise.
652 * tuiSourceWin.h: Remove unused declarations.
653 * tuiSourceWin.c (tui_vUpdateSourceWindowsWithAddr): Remove.
654 (tui_vUpdateSourceWindowsWithLine): Remove.
655 (tui_vAllSetHasBreakAt): Remove.
657 * tuiLayout.h (tui_set_layout): Declare.
658 (tui_vSetLayoutTo): Remove.
659 (tui_vAddWinToLayout): Remove.
660 * tuiLayout.c (_tuiLayout_command): Call tui_enable() to force TUI.
661 (_tuiToggleLayout_command): Remove.
662 (_tuiToggleSplitLayout_command): Remove.
663 (_tuiLayout_command): Remove.
664 (tui_vSetLayoutTo): Remove.
665 (tui_vAddWinToLayout): Remove.
667 * tuiDataWin.h (tui_vCheckDataValues): Remove.
668 * tuiDataWin.c (tui_vCheckDataValues): Remove.
672 * tuiWin.c (tuiStrDup): Remove, replaced by xstrdup.
673 (_parseScrollingArgs): Use xstrdup.
674 (_tuiScrollForward_command): Call tui_enable() to force TUI mode.
675 (_tuiScrollBackward_command): Likewise.
676 (_tuiScrollLeft_command): Likewise.
677 (_tuiScrollRight_command): Likewise.
678 (_tuiSetFocus): Likewise.
679 (_tuiSetFocus_command): Likewise.
680 (_tuiRefreshAll_command): Likewise.
681 (_tuiSetTabWidth_command): Likewise.
682 (_tuiSetWinHeight): Likewise.
683 (_tuiSetWinHeight_command): Likewise.
684 (_tuiXDBsetWinHeight): Likewise.
685 (_tui_vSetFocus): Remove.
686 (_tui_vSetWinHeight): Remove.
687 (_tui_vXDBsetWinHeight): Remove.
691 * tuiCommand.h: Remove unused declarations.
692 * tuiCommand.c (tuiDispatchCtrlChar): Fix escape sequences.
693 (tuiIncrCommandCharCountBy): Remove.
694 (tuiDecrCommandCharCountBy): Remove.
695 (tuiSetCommandCharCountTo): Remove.
696 (tuiClearCommandCharCount): Remove.
700 * tuiWin.c (_initialize_tuiWin): Always define the tui commands;
701 create the tui class help.
702 * tuiLayout.c (_initialize_tuiLayout): Always define the tui commands.
703 * tuiRegs.c (_initialize_tuiRegs): Likewise.
704 * tuiStack.c (_initialize_tuiStack): Likewise.
708 * tuiDisassem.c (tuiVerticalDisassemScroll): Use CORE_ADDR.
709 (tuiVerticalDisassemScroll): Likewise.
710 (tuiShowDisassemAndUpdateSource): Check for null symtab to
715 * tuiIO.c (_tuiHandleResizeDuringIO): Call tuiRefreshAll.
716 (tuiRead, tui_vread): Remove.
718 * tui.c (va_catch_errors, tuiDo, tuiDoAndReturnToTop): Remove.
719 (vcatch_errors, _tui_vDo): Remove.
720 * tui.h (tuiDo, tuiDoAndReturnToTop): Remove.
722 * tuiLayout.c (tuiSetLayout): Remove vcatch_errors.
723 (tui_set_layout): Rename of _tuiSetLayoutTo, public.
724 (_tuiToggleLayout_command): Merge with _tui_vToggleLayout_command.
725 (_tuiToggleSplitLayout_command): Merge with _tui_vToggleSplitLayout_command.
726 (_tuiLayout_command): Call tui_set_layout.
728 * tuiRegs.c (_tuiScrollRegsBackward_command): Call tui_scroll.
729 (_tuiScrollRegsForward_command): Likewise.
730 (_tuiShowFloat_command): Call _tui_vShowRegisters_commandSupport.
731 (_tuiShowGeneral_command): Likewise.
732 (_tuiShowSpecial_command): Likewise.
733 (_tuiToggleFloatRegs_command): Call tuiToggleFloatRegs.
734 * tuiWin.c (tui_scroll): Rename of tui_vScroll, update parameters.
735 (_tuiScrollForward_command): Call tui_scroll.
736 (_tuiScrollBackward_command): Likewise.
737 (_tuiScrollLeft_command): Likewise.
738 (_tuiScrollRight_command): Likewise.
739 (_tuiSetFocus_command): Call _tuiSetFocus.
740 (_tuiRefreshAll_command): Call tuiRefreshAll.
741 (_tuiSetWinHeight_command): Call _tuiSetWinHeight.
742 (_tuiXDBsetWinHeight_command): Call _tuiXDBsetWinHeight.
743 * tuiWin.h (tui_scroll): Rename of tui_vScroll, update parameters.
747 * tuiData.h (TuiLocatorElement): Use CORE_ADDR for address member.
748 (TuiLineOrAddress): Likewise.
749 * tuiDisassem.c (tuiGetBeginAsmAddress): Use CORE_ADDR to specify
751 (tuiSetDisassemContent): Likewise.
752 (tuiShowDisassem, tuiShowDisassemAndUpdateSource): Likewise.
753 * tuiLayout.c (_extractDisplayStartAddr): Likewise.
754 (tuiSetLayout): Likewise.
755 * tuiSourceWin.c (tuiDisplayMainFunction): Likewise.
756 (tuiUpdateSourceWindowsWithAddr): Likewise.
757 (tuiUpdateSourceWindowsWithLine): Likewise.
758 (tuiSetHasBreakAt): Likewise.
759 * tuiStack.c (tuiSetLocatorInfo): Likewise.
760 (tuiSwitchFilename): Likewise.
761 (tuiUpdateLocatorInfoFromFrame): Likewise.
762 (tuiSetLocatorContent): Likewise.
763 (tuiShowFrameInfo): Likewise.
764 * tuiDisassem.h: Update prototypes to use CORE_ADDR.
765 * tuiSourceWin.h: Likewise.
766 * tuiStack.h: Likewise.
770 * tuiWin.c: Add missing includes.
771 (_makeVisibleWithNewHeight): Fix call to find_line_pc.
772 * tuiLayout.c: Add missing includes.
773 (_initAndMakeWin): Don't put curses in echo mode.
774 (_extractDisplayStartAddr): Fix calls to find_line_pc.
775 (_tuiLayout_command): Missing ',' in warning call.
776 * tuiSourceWin.c (tuiUpdateSourceWindowsWithLine): Fix calls to
778 (tuiSetHasBreakAt): Check for null source file.
782 * tuiWin.c (_tuiSetFocus): Replace subsetCompare with subset_compare.
783 * tuiLayout.c (_tuiSetLayoutTo): Likewise.
784 * tui.c (_tui_vToggle_command): Likewise.
788 * tui-file.c: Add include of tuiIO.h, for tuiPuts_unfiltered.
792 * tuiRegs.c (tuiDisplayRegistersFrom): Set scrollok to FALSE in
793 each register window.
794 (tuiCheckRegisterValues): Use REGISTER_RAW_SIZE to obtain the size
795 of the register to check.
796 (_tuiRegValueHasChanged): Likewise.
797 (_tuiRegisterName): Use REGISTER_NAME.
798 (tui_restore_gdbout): New function.
799 (_tuiRegisterFormat): Use do_registers_info with gdb_stdout redirected
801 (START_SPECIAL_REGS): Define.
802 (_tuiGetRegisterRawValue): Use get_saved_register.
803 (_tuiDisplayRegister): Fix clearing of register window.
807 * tui-file.h (fputs_unfiltered_hook): Remove.
808 * tui-file.c (tui_file_flush): Remove fputs_unfiltered_hook.
809 (tui_file_fputs): Likewise; simplify
813 * tuiStack.c: Add missing includes.
814 (tuiShowFrameInfo): Don't crash when there is no symbol table
815 associated with the pc.
816 * tuiSource.c (_hasBreak): Check for null source file.
817 * tuiWin.c (tuiRefreshAll): Check for null winList[type].
818 (_tuiSetFocus): Check for null dataWin.
819 * tuiGeneralWin.c (refreshAll): Check for null list[type].
823 * tuiDisassem.c (tuiSetDisassemContent): Use tm_print_insn_info
824 to disassemble in the curses window.
828 * tui.h: Cleanup to avoid inclusion of curses includes.
829 (TuiGenWinInfo, TuiGenWinInfoPtr): Move from here.
830 * tuiData.h: To here; include curses includes here.
831 (setTermHeightTo): Rename of setTermHeight to follow reality.
832 (setTermWidthTo): Likewise with setTermWidth.
836 * tuiWin.c, tui.c, tuiCommand.c: Use ansi prototype.
837 tuiIO.c, tuiData.c: Likewise.
838 tuiDataWin.c, tuiDisassem.c: Likewise.
839 tuiGeneralWin.c, tuiLayout.c: Likewise.
840 tuiRegs.c, tuiSource.c: Likewise.
841 tuiSouceWin.c, tuiStack.c: Likewise.
845 * tuiWin.c, tuiWin.h, tui.c, tui.h, tuiCommand.c: Add FSF copyright.
846 tuiCommand.h, tuiIO.c, tuiIO.h, tuiData.h, tuiData.c: Likewise.
847 tuiDataWin.c, tuiDataWin.h, tuiDisassem.c, tuiDisassem.h: Likewise.
848 tuiGeneralWin.c, tuiGeneralWin.h, tuiLayout.c, tuiLayout.h: Likewise.
849 tuiRegs.c, tuiRegs.h, tuiSource.c, tuiSource.h: Likewise.
850 tuiSouceWin.c, tuiSourceWin.h, tuiStack.c, tuiStack.h: Likewise.
854 * tuiRegs.c: Use NUM_REGS, not ARCH_NUM_REGS.
858 * tui-file.h: Update/correct copyright notice.
862 * tui-file.c: Add __FILE__ and __LINE__ parameter to calls to
867 * tui-file.c, tui.c, tuiData.c, tuiLayout.c: Replace occurrences
868 of free() with xfree().
872 * tuiSourceWin.h: Eliminate use of PARAMS from this file.
876 * tuiLayout.c: Eliminate use of PARAMS from this file.
880 * tuiIO.c: Eliminate use of PARAMS from this file.
884 * tui-file.c: Include "tui.h", "tuiData.h", "tuiIO.h" and
886 (tui_file_fputs): Pass ``file'' and not ``stream'' to
887 tui_file_adjust_strbuf.
891 * tui.h: Include <ncurses.h> when available.
892 * tui.c, tuiGeneralWin.c: Do not include <curses.h>.
896 * Makefile.in: Delete.
900 * Makefile.in (distclean, maintainer-clean, realclean,
901 mostlyclean): New targets.
905 * tui-file.c, tui-file.h, tuiDisassem.c, tuiIO.c, tuiIO.h,
906 tuiRegs.c: Update to reflect rename of gdb-file / GDB_FILE to
907 ui-file / ``struct ui_file''.
911 * tui-file.c (enum streamtype, struct tui_stream, tui_file_new,
912 tui_file_delete, tui_fileopen, tui_sfileopen, tui_file_isatty,
913 tui_file_rewind, tui_file_put, tui_file_fputs,
914 tui_file_get_strbuf, tui_file_adjust_strbuf, tui_file_flush,
915 fputs_unfiltered_hook): Move to here from ../utils.c
917 * tui-file.h, tui-file.c: New files.
921 * tuiRegs.c (_tuiRegisterFormat), tuiDisassem.c
922 (tuiSetDisassemContent): Replace gdb_file_init_astring with
923 tui_sfileopen. Replace gdb_file_get_strbuf with
928 * tuiRegs.c (_tuiRegisterFormat), tuiDisassem.c
929 (tuiSetDisassemContent): Repace gdb_file_deallocate with
930 gdb_file_delete. Replace gdb_file_init_astring with tui_sfileopen.
934 * tuiSource.c: Include "source.h".
935 (open_source_file, find_source_lines): Delete declarations.
939 * tui.h: Include stdarg.h instead of varargs.h if we're on an ISO Cish
948 changes originally made by HP; HP did not create ChangeLog
951 * Makefile.in: New file; we're merging HP's changes into GDB, and
952 we've moved the TUI files into a subdirectory, so we need a new
956 #include <term.h>, if we have it, to get declarations for
957 the termcap functions on Solaris.
958 (tgoto): Add external K&R declaration for this; Solaris doesn't
959 bother to actually declare it in their header files.
960 (_tuiReset): Ignore the #definition of TIOCGETC if USG is defined;
961 we'd rather use the USG mechanisms than the Berkeley mechanisms
962 (TIOCGETC is one of the Berkeley terminal control ioctls).
963 Apologies if this causes trouble later; this should all be handled
965 (strcat_to_buf, strcat_to_buf_with_fmt): New functions, moved here
967 (tuiFree): replace safe_free with free.
968 (strcat_to_buf): new function, copied from utils.c.
969 (tuiInit): Add ignored `argv0' argument, to match the type that
970 init_ui_hook expects; updated declaration. Call the
971 initialize_tui_files function constructed above. Initialize
973 (tuiInitWindows): Call tuiSetLocatorContent, to get the first
974 element of the locator window's content allocated. This seems
975 wrong, because it must have been initialized somehow in HP's
976 sources, and we should do it the same way now. But we do get
977 further before it segfaults. [Postscript: HP didn't bother to
978 initialize it; they compile
979 (va_catch_errors, vcatch_errors): Functions moved here from
980 ../utils.c in HP's sources. They're not used anywhere else.
981 (xdb_style): Delete this variable, and remove all references to
982 it. It's always true.
983 (tuiInit, _tui_vDo): References removed.
985 * tui.h: Add prototypes.
986 Don't #include "gendefs.h"; it's only used in the TUI.
987 Integrate its contents into this file:
988 #include <ansidecl.h> here.
989 (Opaque, OpaqueFuncPtr): Typedefs moved to here.
991 * tuiCommand.c: #include "defs.h", so we get the appropriate
992 definition of GDB_FILE.
995 (freeWindow): replace safe_free with free.
996 (tui_version): don't define it here; it's defined in main.c now.
999 (tuiSetDisassemContent): Call strcat_address_numeric instead of
1000 strcat_address. Simplify the control structure. Use predefined
1001 GDB function to print asm inst address. Use GDB_FILE to collect
1002 output into buffers.
1005 (tgoto): Add external K&R declaration for this here too.
1006 (tuiGetc, tuiTermSetup, tuiTermUnsetup): Same.
1007 (tuiPuts_unfiltered): change FILE to GDB_FILE.
1008 (tui_tputs): fix prototype for 3rd argument.
1010 * tuiIO.h (tuiPuts_unfiltered): change declaration.
1013 (_tuiSetLayoutTo): for displaying registers, hook up the HP code
1014 that decides which registers to display (i.e. single precision
1015 float, double precision float, general, special). Previously,
1016 only handled TUI_GENERAL_REGS. Now that the code is hooked up,
1017 compiling with -z poses a problem. When the first layout command
1018 is 'layout regs', dataWin->detail is a NULL pointer, and gdb
1021 * tuiLayout.c (_tuiSetLayoutTo): replace safe_free with free.
1023 * tuiRegs.c #include "defs.h" earlier, to avoid problems in
1024 <stdarg.h>. No idea exactly what's conflicting with what, but the
1026 (_tuiRegisterFormat): Change so that function creates a GDB_FILE
1027 object, calls pa_do_strcat_registers_info, copies the register
1028 info into a buffer, and deallocates the GDB_FILE object. Remove
1029 some code that is not executed. Also, call to
1030 pa_do_strcat_registers_info has an additional parameter,
1031 precision. This code requires some new per-target functions that
1032 we don't want to merge. Dyke it out, with #ifdef
1033 TUI_EXTENDED_FORMATTERS.
1034 (_tuiSetSpecialRegsContent): this function was ifdefed out.
1036 (_tuiSetGeneralAndSpecialRegsContent): this function was ifdefed
1038 (IS_64BIT): Just define this to be zero; we're not merging in the
1040 (tuiShowRegisters): Comment out all references to the "special"
1041 regs; we don't have a distinction between the "special" and
1042 "non-special" regs in most of our machine descriptions. This code
1043 is PA-specific in other ways as well, and needs to be redesigned
1044 to be portable to other processors.
1046 * tuiWin.c: #include <string.h>, to get a declaration for
1049 * tui.c, tuiCommand.c, tuiData.c, tuiDataWin.c, tuiDisassem.c,
1050 tuiGeneralWin.c, tuiIO.c, tuiLayout.c, tuiRegs.c, tuiSource.c,
1051 tuiSourceWin.c, tuiStack.c, tuiWin.c: New files (from HP). Changed
1052 bool to int throughout. Re-indented, GNU style.
1054 * tui.h, tuiCommand.h, tuiData.h, tuiDataWin.h, tuiDisassem.h,
1055 tuiGeneralWin.h, tuiIO.h, tuiLayout.h, tuiRegs.h, tuiSource.h,
1056 tuiSourceWin.h, tuiStack.h, tuiWin.h: new files (from HP).
1057 Changed bool to int throughout.