3 * tuiStack.c (tuiShowFrameInfo): Fix typo.
7 * tui/tui-hooks.c: Update to use deprecated_selected_frame.
8 * tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
9 * tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
13 * tuiStack.c (tuiShowFrameInfo): Use find_frame_sal instead of
18 * tuiStack.c (tuiShowFrameInfo): Use get_frame_type instead of
19 deprecated_frame_in_dummy. Fix coding style.
23 * tui-hooks.c (tui_init_hook): Don't enable the TUI if a specific
24 interpreter is installed.
28 * tuiStack.c (tuiShowFrameInfo): Use get_frame_type instead of
29 signal_handler_caller.
33 * tuiStack.c (tuiShowFrameInfo): Replace frame_in_dummy with
34 deprecated_frame_in_dummy.
38 * tuiIO.c (tui_prep_terminal): Save the prompt registered in readline.
39 (tui_redisplay_readline): Use the last saved prompt.
40 (tui_rl_saved_prompt): New.
45 * tuiWin.c (ACS_LRCORNER, ACS_LLCORNER, ACS_ULCORNER, ACS_URCORNER,
46 ACS_HLINE, ACS_VLINE): Define if they don't exist.
51 * tuiIO.c (tui_initialize_io): Use setvbuf since this is portable.
55 * tui-hooks.c (selected_frame_level_changed_hook): Use the one
56 exported from frame.h.
60 * tui.c (tui_show_source): Don't access current_source_symtab, use
61 accessor function instead. Include source.h and symtab.h
62 * tuiDisassem.c (tuiShowDisassemAndUpdateSource,
63 tuiVerticalDisassemScroll): Use accessor functions for current
64 source line and symtab. Include source.h.
65 * tuiLayout.c (_extractDisplayStartAddr): Use accessor functions
66 for current source line and symtab. Include source.h.
67 * tuiWin.c (_makeVisibleWithNewHeight): Ditto.
68 * tuiSourceWin.c (tuiUpdateSourceWindowAsIs,
69 tuiHorizontalSourceScroll): Ditto.
70 * tuiSource.c (tuiVerticalSourceScroll): Ditto.
74 * tui.c (tui_rl_switch_mode): Remove unecessary TUI switch printfs.
75 (tui_initialize_readline): Allow to use space to leave SingleKey
76 to enter one gdb command.
77 (tui_enable): Restore the TUI keymap when we are back to TUI.
78 (tui_disable): Restore normal keymap when leaving TUI.
79 * tuiIO.c (tui_redisplay_readline): Restore the SingleKey mode
80 when the buffer becomes empty and we are in tui_one_command_mode.
84 * tuiIO.c (tui_setup_io): rl_already_prompted must be cleared
85 when leaving TUI mode so that gdb prompt is displayed.
89 * tuiStack.c (tui_make_status_line): Make sure the local buffer
90 is large enough to hold the complete line.
94 * tui-hooks.c (tui_event_loop): New function.
95 (tui_command_loop): New function to override gdb loop and make sure
96 uiout is set according to TUI mode.
97 (tui_command_loop): Install the specific TUI command hook.
98 * tuiIO.c (tui_initialize_io): Initialize tui_old_uiout.
99 (tui_uiout, tui_old_uiout): Make public.
100 * tuiIO.h (tui_uiout, tui_old_uiout): Declare.
104 * tuiIO.c (tui_putc): New function to print one character.
105 (printable_part): New function from readline/complete.c.
106 (PUTX): New macro, likewise.
107 (print_filename): New function, likewise.
108 (get_y_or_n): New function, likewise and adapted for TUI.
109 (tui_rl_display_match_list): New function from readline/complete.c
110 and writes on TUI command window.
111 (tui_setup_io): Install or remove the readline hook
112 rl_completion_display_matches_hook so that completion is written
113 directly in TUI command window instead of in the TUI pipe.
114 (tui_initialize_io): Use #ifdef TUI_USE_PIPE_FOR_READLINE for the
115 TUI redirection pipe.
116 (tui_getc): Likewise for call to tui_readline_output.
117 (tui_readline_output): Likewise for function.
118 * tui.c (tui_rl_startup_hook): Always take care of gdb prompt.
122 * tuiWin.c (_newHeightOk): Fix compilation warnings.
126 * tuiWin.c (_tuiAllWindowsInfo): Don't crash if the window
131 * tui-out.c (tui_out_new): Clear start_of_line.
132 * tuiSource.c (tuiVerticalSourceScroll): Use print_source_lines
133 to update the current source line.
137 * tui-hooks.c (tui_detach_hook): New hook to know when a process dies.
138 (tui_install_hooks): Install it.
139 (tui_remove_hooks): Remove it.
143 * tuiData.h (FILE_PREFIX): Don't define.
144 (blankStr, locationStr, breakStr): Don't declare.
145 (breakLocationStr, nullStr, historyLimit, setHistoryLimitTo): Likewise.
146 (displayableWinContentOf, displayableWinContentAt): Likewise.
147 (winElementHeight, winByName, freeAllWindows): Likewise.
149 * tuiData.c (blankStr, locationStr, breakStr): Remove.
150 (breakLocationStr, nullStr, historyLimit, setHistoryLimitTo): Remove.
151 (displayableWinContentOf, displayableWinContentAt): Remove.
152 (winElementHeight, winByName, freeAllWindows): Remove.
156 * tuiStack.c (tui_make_status_line): New function to create the
158 (tuiShowLocatorContent): Use it instead of displayableWinContentAt.
159 * tuiData.h (PROC_PREFIX): Use "In:" to reduce length of prefix.
160 (PC_PREFIX): Use upper case.
161 (SINGLE_KEY, MIN_LINE_WIDTH, MIN_PROC_WIDTH): Define.
162 (MAX_TARGET_WIDTH, MAX_PID_WIDTH): Define.
166 * tuiSourceWin.h (tuiUpdateAllExecInfos): Don't declare.
167 (tuiClearAllExecInfosContent): Likewise.
168 (tuiEraseAllExecInfosContent): Ditto.
169 (tuiUpdateSourceWindowsFromLocator): Ditto.
170 * tuiSourceWin.c (tuiUpdateAllExecInfos): Remove.
171 * tui.h (tui_vCheckDataValues): Don't declare.
172 (tui_vStartNewLines, tui_vAllSetHasBreakAt): Likewise.
173 (tui_vUpdateLocatorFilename, tui_vUpdateSourceWindowsWithAddr): Ditto.
174 (tui_vShowFrameInfo): Ditto.
178 * tui.c (tui_commands): Table of single key commands.
179 (tui_rl_command_key): New function to execute gdb command.
180 (tui_rl_command_mode): New function to temporarily leave SingleKey.
181 (tui_rl_next_keymap): New function to enter/leave the SingleKey mode.
182 (tui_rl_startup_hook): New function to avoid prompt display by
184 (tui_set_key_mode): New function to set the key mode and install
186 (tui_initialize_readline): Create TUI SingleKey readline map.
187 (tui_enable): Install rl_startup_hook.
188 (tui_disable): Remove it.
189 * tui.h (enum tui_key_mode): Declare.
190 (tui_set_key_mode, tui_current_key_mode): Declare.
191 * tuiIO.c (tui_redisplay_readline): Don't display the prompt in
193 * tuiIO.h (tui_redisplay_readline): Declare.
197 * tuiSourceWin.c (tuiSetIsExecPointAt): Redraw the previous and
202 * tuiSource.c (tuiSetSourceContent): Remove old breakpoint code.
204 (tuiShowSource): Fix comment indentation.
205 (tuiSourceIsDisplayed): Likewise.
206 (tuiVerticalSourceScroll): Likewise.
210 * tuiSourceWin.h (tui_update_all_breakpoint_info): Declare.
211 (tui_update_breakpoint_info): Declare.
212 (tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove.
214 * tuiSourceWin.c (tuiUpdateSourceWindowAsIs): Update breakpoint
215 information using tui_update_breakpoint_info.
216 (tui_update_all_breakpoint_info): New function to refresh all
218 (tui_update_breakpoint_info): New function to recompute the status
219 of exec info window from breakpoints.
220 (tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove.
221 (tuiSetExecInfoContent): Use the exec info flags computed by
222 tui_update_breakpoint_info to display a short status about breakpoints.
224 * tuiData.h (TuiExecInfoContent): New for exec info string.
225 (TuiWhichElement): Use it.
226 (TUI_BP_ENABLED, TUI_BP_DISABLED, TUI_BP_HIT): New defines.
227 (TUI_BP_CONDITIONAL, TUI_BP_HARDWARE): New defines.
228 (TUI_BP_HIT_POS, TUI_BP_BREAK_POS, TUI_EXEC_POS): Likewise.
229 (TUI_EXECINFO_SIZE): Likewise.
230 * tuiData.c (initContentElement): Clear exec info string.
232 * tui-hooks.c (get_breakpoint): Remove.
233 (tui_event_create_breakpoint): Call tui_update_all_breakpoint_info.
234 (tui_event_delete_breakpoint): Likewise.
235 (tui_event_modify_breakpoint): Likewise.
239 * tui.c (tuiGetLowDisassemblyAddress): Moved from here.
240 * tuiDisassem.c (tuiGetLowDisassemblyAddress): To here, and use
241 tui_find_disassembly_address to find the starting address of
246 * tuiDisassem.c (tui_disassemble): New function to disassemble
247 several lines in a buffer.
248 (tui_find_disassembly_address): New function to search backward
249 or forward a disassembly line.
250 (tuiSetDisassemContent): Use tui_disassemble to obtain the real
251 content and format it in the window.
252 (tuiShowDisassemAndUpdateSource): Remove unused locals.
253 (tuiVerticalDisassemScroll): Use tui_find_disassembly_address to
254 obtain the address to disassemble for the scrolling.
255 * tuiDisassem.h (tuiGetBeginAsmAddress): Update.
256 * tuiSourceWin.c (tuiUpdateSourceWindowAsIs): Don't pass symtab.
260 * tuiIO.c (CTRL_CHAR): Redefine and use readline 4.3 definition.
265 * tui.c (tui_disable): Update gdb's knowledge of its terminal
266 using target_terminal_save_ours.
267 (tui_enable): Likewise.
271 * tui.c (tui_rl_switch_mode): Renames tui_switch_mode.
272 (tui_rl_change_windows): Renames tui_change_windows.
273 (tui_rl_delete_other_windows): Renames tui_delete_other_windows.
274 (tui_initialize_readline): Update.
278 * tuiDisassem.c (tuiSetDisassemContent): Use breakpoint_here_p.
283 * tuiDisassem.c (tuiGetBeginAsmAddress): Use lookup_minimal_symbol
284 to find symbol address.
288 * tuiSourceWin.c (tui_display_main): Rename from tuiDisplayMainFunction
289 and use tuiGetBeginAsmAddress.
290 * tuiSourceWin.h (tui_display_main): Declare.
291 * tui.h (tuiDisplayMainFunction): Remove.
292 * tui-hooks.c (tui_new_objfile_hook): Update.
296 * tuiSource.h (m_tuiShowSourceAsIs): Remove macro.
297 (tuiShowSourceAsIs): Don't declare.
301 * tui-hooks.c (tui_selected_frame_level_changed_hook): Always update
306 * tuiStack.c (tuiSetLocatorContent): Remove.
307 (tuiUpdateLocatorInfoFromFrame): Remove.
308 (tui_set_locator_info): Allocate the content buffer if necessary.
309 (tui_set_locator_filename): Call tui_set_locator_info directly.
310 (tuiShowFrameInfo): Likewise and use find_pc_line instead of
315 * tuiSourceWin.c (tuiDisplayMainFunction): Update to use
316 tuiUpdateLocatorFilename.
317 * tuiStack.c (tuiSetLocatorInfo): Make it static.
318 (tuiSetLocatorContent): Likewise.
319 (tuiUpdateLocatorInfoFromFrame): Likewise.
320 (tuiSwitchFilename): Remove.
321 (tui_set_locator_filename): New function
322 (tui_set_locator_info): Rename from tuiSetLocatorInfo to GNU-ify;
323 use tui_set_locator_filename to record the filename.
324 (tuiUpdateLocatorFilename): Likewise.
325 (tuiUpdateLocatorInfoFromFrame): Update.
326 (tuiSetLocatorContent): Likewise.
327 * tuiStack.h (tuiClearLocatorContent): Don't declare.
328 (tuiSetLocatorInfo, tuiSetLocatorContent): Likewise.
329 (tuiUpdateLocatorInfoFromFrame, tuiSwitchFilename): Likewise.
333 * tuiSourceWin.c (tuiSetHasBreakAt): Use filename for breakpoint
335 * tuiSource.c (tuiSetSourceContent): Set window title and filename.
336 * tuiGeneralWin.c (boxWin): Print optional title on top of window.
337 * tuiData.h (TuiSourceInfo): Add filename member.
338 (TuiGenWinInfo): Add title member.
339 * tuiData.c (initGenericPart): Clear title.
340 (freeWindow): Free title and filename; remove unused locals.
341 (initWinInfo): Clear filename.
342 (tuiDelWindow): Free it; remove unused locals.
346 * tuiStack.h (tuiGetLocatorFilename): Don't declare.
347 (tuiUpdateLocatorDisplay): Likewise.
348 * tuiStack.c (tuiGetLocatorFilename): Remove.
349 (tuiShowFrameInfo): Use tuiSetLocatorContent and tuiShowLocatorContent
350 instead of tuiUpdateLocatorDisplay.
351 (tuiUpdateLocatorDisplay): Remove.
355 * tuiStack.h (tuiClearLocatorDisplay): Don't declare.
356 * tuiStack.c (tuiClearLocatorDisplay): Remove.
357 (tuiShowLocatorContent): Use wclrtoeol to clear end of status line.
358 (tuiUpdateLocatorDisplay): Don't call tuiClearLocatorDisplay.
362 * tuiStack.c (tui_get_function_from_frame): Rename from
363 _getFuncNameFromFrame; use print_address_symbolic to get symbolic
365 (tuiUpdateLocatorInfoFromFrame): Update.
369 * tuiRegs.c (tuiDisplayRegistersFrom): Remove unused locals.
370 (_tuiRegisterFormat, _tuiSetSpecialRegsContent): Likewise.
371 (_tuiSetGeneralAndSpecialRegsContent): Likewise.
372 (_tuiSetFloatRegsContent): Likewise.
373 (_tuiRegisterName): Return a const char*.
374 * tuiData.h (_TuiDataElement): Use const char* for name.
378 * tuiSourceWin.h (tuiEraseAllSourceContent): Don't declare.
379 (tuiShowAllExecInfosContent): Likewise.
380 * tuiSourceWin.c (tuiEraseAllSourceContent): Remove.
381 (tuiShowAllExecInfosContent): Remove.
382 (tuiAllocSourceBuffer): Remove unused locals.
386 * tuiStack.c (tui_update_command): Rename _tuiUpdateLocation_command
387 to follow other gdb's command names; use execute_command; cleanup.
388 (_initialize_tuiStack): Update.
392 * tuiWin.h (tui_update_gdb_sizes): Declare.
396 * tui.c (strcat_to_buf): Use const char* for source item.
397 (tui_enable): Update the windows if there is a selected frame.
398 * tui.h (strcat_to_buf): Update prototype.
399 (strcat_to_buf_with_fmt): Remove.
403 * tuiWin.c (tui_update_gdb_sizes): New function to tell gdb what
404 is the size of command window.
405 (tuiResizeAll): Call it instead of init_page_info.
406 * tui.c (tui_enable): Call it to resize to TUI command window.
407 (tui_disable): Likewise for plain screen.
411 * tui.c (tui_enable): Use tuiSetLayout instead of showLayout and
412 use tuiShowFrameInfo instead of tuiSetLocatorContent.
413 * tuiLayout.h (showLayout): Remove.
414 * tuiLayout.c (_showSourceOrDisassemAndCommand): Remove unused locals.
415 (_showSourceDisassemCommand): Likewise.
416 (showLayout): Make it static.
417 (lastLayout): Remove.
421 * tuiSourceWin.c (tui_show_source_line): New function.
422 (tuiShowSourceContent): Call it and avoid clearing the window before
424 (tuiClearAllSourceWinsContent): Remove.
425 * tuiSourceWin.h (tuiClearAllSourceWinsContent): Don't declare.
426 * tuiWin.h (tuiClearWinFocus, tuiClearWinFocusFrom): Don't declare.
427 * tuiWin.c (tuiClearWinFocus, tuiClearWinFocusFrom): Remove.
428 (tuiRefreshAll): Don't clear the window.
429 (_makeVisibleWithNewHeight): Don't clear locator line.
430 (tuiResizeAll): Remove unused locals.
431 (_tuiAdjustWinHeights): Likewise.
432 (_makeInvisibleAndSetNewHeight): Likewise.
433 (_newHeightOk): Likewise.
434 * tuiLayout.c (showLayout): Don't clear source windows.
435 (tuiSetLayout): Don't clear the window.
436 (_initAndMakeWin): Likewise for status line.
437 * tuiGeneralWin.c (makeVisible): Don't clear or refresh the window.
438 (makeWindow): Likewise.
439 (tuiClearWin): Remove.
440 * tuiGeneralWin.h (tuiClearWin): Don't declare.
444 * tuiSourceWin.c (tuiSrcWinIsDisplayed): Remove.
445 (tuiAsmWinIsDisplayed): Remove.
446 (tuiShowAllSourceWinsContent): Remove.
447 (tuiUpdateOnEnd): Remove.
448 * tuiGeneralWin.c (scrollWinForward): Remove.
449 (scrollWinBackward): Remove.
450 (_winResize): Don't declare.
451 * tui.h (tuiUpdateOnEnd): Don't declare.
452 (vcatch_errors, va_catch_errors): Likewise.
453 * tuiSourceWin.h (tuiUpdateOnEnd): Likewise.
454 (tuiShowAllSourceWinsContent): Likewise.
455 * tuiGeneralWin.h (scrollWinForward): Likewise.
456 (scrollWinBackward): Likewise.
460 * tuiRegs.c (_tuiRegisterFormat): Use gdbarch_print_registers_info.
465 * tui.c: Disable <termio.h> include.
469 * tui-out.c (XMALLOC): Delete macro. Update copyright.
473 * tui-hooks.c: Add FIXME to explain true/false problem. Update
475 * tui.c, tuiCommand.c, tuiData.c, tuiDataWin.c: Ditto.
476 * tuiDisassem.c, tuiGeneralWin.c, tuiIO.c, tuiLayout.c: Ditto.
477 * tuiRegs.c, tuiSource.c, tuiSourceWin.c, tuiStack.c: Ditto.
481 * tui-hooks.c: Include <curses.h> before "bfd.h".
483 * tuiCommand.c: Likewise.
484 * tuiData.c: Likewise.
485 * tuiDataWin.c: Likewise.
486 * tuiDisassem.c: Likewise.
487 * tuiGeneralWin.c: Likewise.
489 * tuiLayout.c: Likewise.
490 * tuiRegs.c: Likewise.
491 * tuiSource.c: Likewise.
492 * tuiSourceWin.c: Likewise.
493 * tuiStack.c: Likewise.
494 * tuiWin.c: Likewise.
498 * tuiWin.c (_initialize_tuiWin): Replace NO_FUNCTION with NULL.
502 * tuiDisassem.c: Include "value.h".
503 * tuiSourceWin.c: Ditto.
507 * tuiLayout.h (tui_set_layout): Don't declare.
508 * tui.h (tui_vAddWinToLayout): Don't declare.
509 (tui_vSetLayoutTo): Likewise.
510 (tui_set_layout): Declare.
514 * tuiSourceWin.c: Use disp_del instead of del.
516 * tuiSource.c: Use disp_del instead of del.
518 * tuiDisassem.c: Use disp_del instead of del.
522 * tui.c (tui_enable): Remove call to terminal_save_ours().
523 (tui_disable): Likewise.
527 * tuiWin.c (_initialize_tuiWin): Use specific tui prefix for
528 set/show configuration variables.
529 (show_tui_cmd): New function.
530 (set_tui_cmd): New function.
534 * tui-hooks.c: New file, gdb hooks for tui.
535 * tui-out.c: New file, image copied from cli-out.c.
536 (tui_field_int): Identify "line" fields and keep track of them.
537 (tui_field_string): Likewise for "file".
538 (tui_out_new): Use flags = 0 to avoid printing the sources.
542 * tuiIO.c (tui_cont_sig): Update cursor position on the screen to
543 leave it in the command window.
544 (tui_redisplay_readline): Save cursor position to restore the
545 cursor after we go back from background.
546 * tuiData.h (TuiCommandInfo): Add start_line member.
550 * tuiStack.c (tuiUpdateLocatorFilename): Use const char*.
551 * tuiStack.h (tuiUpdateLocatorFilename): Update prototype.
552 * tuiWin.c (_initialize_tuiWin): Don't cast table of enum in calls
554 * tui.c (tui_show_source): New function.
555 (tuiGetLowDisassemblyAddress): Use CORE_ADDR for newLow.
556 (tui_switch_mode): Prep or deprep readline terminal;
557 make sure the \n we return does not redo the last command.
558 * tui.h (tui_show_source): Declare.
559 (tui_out_new, tui_install_hooks, tui_remove_hooks): Likewise.
560 (tui_active, tui_initialize_io, tui_initialize_readline): Likewise.
564 * tuiIO.c (tui_initialize_io): Install tui_cont_sig signal handler
565 if SIGCONT is defined.
566 (tui_cont_sig): New function when SIGCONT is defined.
567 (tui_setup_io): Save tty setting to restore by SIGCONT.
571 * tui.h (tui_show_assembly): Declare.
572 (tui_is_window_visible): Declare.
573 * tui.c (tui_show_assembly): New function.
574 (tui_is_window_visible): New function.
575 (tui_get_command_dimension): New function.
579 * tuiWin.c (tuiRefreshAll): Use clearok to force a refresh.
583 * tui-file.c (tui_file_fputs): Use tui_puts.
587 * tuiStack.c (tuiSetLocatorInfo): Cleanup.
588 * tuiStack.h (tuiGetLocatorFilename): Declare.
589 * tuiRegs.h (tuiFirstRegElementNoInLine): Declare.
590 * tuiData.h (addToSourceWindows): Declare.
594 * tui.c (tui_change_windows): New function.
595 (tui_delete_other_windows): New function.
596 (tui_initialize_readline): Bind them to C-X 1 and C-X 2.
597 (tui_enable): Enable the keypad; call tui_update_variables.
598 (strcat_to_buf_with_fmt): Remove.
602 * tui.h: Remove old declarations, add the new ones.
603 * tui.c (tui_switch_mode): New function.
604 (tui_initialize_readline): New function.
605 (tui_enable): New function.
606 (tui_disable): New function.
607 (tuiGetLowDisassemblyAddress): Use CORE_ADDR, cleanup.
608 (tui_vSelectSourceSymtab): Remove.
609 (tuiInitWindows): Remove.
610 (_initialize_tui): Remove.
611 (_tuiReset): Keep but put arround #if 0.
615 * tuiIO.h: Remove old declarations and add the new ones.
616 * tuiIO.c: New management for curses and gdb terminal interactions.
618 (tuiTermSetup, tuiTermUnsetup): Remove, must use normal curses ops.
619 (tuiBufferGetc, tui_vStartNewLines, _updateCommandInfo): Remove.
620 (tui_owns_terminal): Remove.
621 (tui_redisplay_readline): New function.
622 (tui_puts): New function.
623 (tui_prep_terminal): New function.
624 (tui_deprep_terminal): New function.
625 (tui_getc): Rename of tuiGetc, simplify and fix.
626 (tui_setup_io): New function.
627 (tui_initialize_io): New function.
631 * tuiRegs.c (tuiDisplayRegistersFrom): Call touchwin.
632 (_tuiRegisterFormat): Reduce size of format result.
636 * tuiGeneralWin.c (boxWin): Use the tui configuration variables.
637 * tuiWin.h: Declare the new variables.
638 * tuiWin.c (_initialize_tuiWin): Create TUI configuration variables.
639 (tui_update_variables): New function.
640 (translate): New function.
641 (tui_border_kind_enums, tui_border_mode_enums): New tables.
642 (tui_border_mode_translate): New table.
643 (tui_border_kind_translate_*): New tables.
644 (tui_active_border_mode): New variables.
645 (tui_border_*): New variables.
649 * tuiWin.c (_parseScrollingArgs): Fix uninitialized variable.
650 (_makeVisibleWithNewHeight): Use TuiLineOrAddress type.
652 * tuiStack.c (tuiShowFrameInfo): Use TuiLineOrAddress type.
653 (tui_vUpdateLocatorFilename): Remove.
654 * tuiStack.h: Update prototypes.
656 * tuiSourceWin.c (tuiAddrIsDisplayed): New function.
657 (tuiLineIsDisplayed): Split for address and line.
658 (tuiUpdateSourceWindow): Use TuiLineOrAddress type.
659 (tuiUpdateSourceWindowAsIs): Likewise.
660 (tuiUpdateSourceWindowsWithAddr): Likewise.
661 (tuiUpdateSourceWindowsWithLine): Likewise.
662 (tuiHorizontalSourceScroll): Likewise.
663 (tuiSetIsExecPointAt): Likewise.
664 (tuiUpdateOnEnd): Likewise.
665 * tuiSourceWin.h: Update prototypes.
667 * tuiSource.c (tuiVerticalSourceScroll): Use TuiLineOrAddress type.
668 (tuiShowSource): Likewise.
669 (tuiVerticalSourceScroll): Likewise.
670 * tuiSource.h (tuiShowSource): Update prototype.
672 * tuiDisassem.c (tuiSetDisassemContent): Use CORE_ADDR for address.
673 (tuiShowDisassem): Use TuiLineOrAddress type.
674 (tuiShowDisassemAndUpdateSource): Likewise.
675 (tuiVerticalDisassemScroll): Likewise.
676 (tuiShowDisassemAsIs): Remove.
677 * tuiDisassem.h (tuiSetDisassemContent): Update prototype.
679 * tuiData.c (initWinInfo): Use CORE_ADDR for address.
680 (clearWinDetail): Likewise.
681 (displayableWinContentOf): Fix address conversion.
682 (tuiNextWin): Fix crash when the window is not yet created.
683 (partialWinByName): Likewise.
687 * tuiSourceWin.h: Remove unused declarations.
688 * tuiSourceWin.c (tui_vUpdateSourceWindowsWithAddr): Remove.
689 (tui_vUpdateSourceWindowsWithLine): Remove.
690 (tui_vAllSetHasBreakAt): Remove.
692 * tuiLayout.h (tui_set_layout): Declare.
693 (tui_vSetLayoutTo): Remove.
694 (tui_vAddWinToLayout): Remove.
695 * tuiLayout.c (_tuiLayout_command): Call tui_enable() to force TUI.
696 (_tuiToggleLayout_command): Remove.
697 (_tuiToggleSplitLayout_command): Remove.
698 (_tuiLayout_command): Remove.
699 (tui_vSetLayoutTo): Remove.
700 (tui_vAddWinToLayout): Remove.
702 * tuiDataWin.h (tui_vCheckDataValues): Remove.
703 * tuiDataWin.c (tui_vCheckDataValues): Remove.
707 * tuiWin.c (tuiStrDup): Remove, replaced by xstrdup.
708 (_parseScrollingArgs): Use xstrdup.
709 (_tuiScrollForward_command): Call tui_enable() to force TUI mode.
710 (_tuiScrollBackward_command): Likewise.
711 (_tuiScrollLeft_command): Likewise.
712 (_tuiScrollRight_command): Likewise.
713 (_tuiSetFocus): Likewise.
714 (_tuiSetFocus_command): Likewise.
715 (_tuiRefreshAll_command): Likewise.
716 (_tuiSetTabWidth_command): Likewise.
717 (_tuiSetWinHeight): Likewise.
718 (_tuiSetWinHeight_command): Likewise.
719 (_tuiXDBsetWinHeight): Likewise.
720 (_tui_vSetFocus): Remove.
721 (_tui_vSetWinHeight): Remove.
722 (_tui_vXDBsetWinHeight): Remove.
726 * tuiCommand.h: Remove unused declarations.
727 * tuiCommand.c (tuiDispatchCtrlChar): Fix escape sequences.
728 (tuiIncrCommandCharCountBy): Remove.
729 (tuiDecrCommandCharCountBy): Remove.
730 (tuiSetCommandCharCountTo): Remove.
731 (tuiClearCommandCharCount): Remove.
735 * tuiWin.c (_initialize_tuiWin): Always define the tui commands;
736 create the tui class help.
737 * tuiLayout.c (_initialize_tuiLayout): Always define the tui commands.
738 * tuiRegs.c (_initialize_tuiRegs): Likewise.
739 * tuiStack.c (_initialize_tuiStack): Likewise.
743 * tuiDisassem.c (tuiVerticalDisassemScroll): Use CORE_ADDR.
744 (tuiVerticalDisassemScroll): Likewise.
745 (tuiShowDisassemAndUpdateSource): Check for null symtab to
750 * tuiIO.c (_tuiHandleResizeDuringIO): Call tuiRefreshAll.
751 (tuiRead, tui_vread): Remove.
753 * tui.c (va_catch_errors, tuiDo, tuiDoAndReturnToTop): Remove.
754 (vcatch_errors, _tui_vDo): Remove.
755 * tui.h (tuiDo, tuiDoAndReturnToTop): Remove.
757 * tuiLayout.c (tuiSetLayout): Remove vcatch_errors.
758 (tui_set_layout): Rename of _tuiSetLayoutTo, public.
759 (_tuiToggleLayout_command): Merge with _tui_vToggleLayout_command.
760 (_tuiToggleSplitLayout_command): Merge with _tui_vToggleSplitLayout_command.
761 (_tuiLayout_command): Call tui_set_layout.
763 * tuiRegs.c (_tuiScrollRegsBackward_command): Call tui_scroll.
764 (_tuiScrollRegsForward_command): Likewise.
765 (_tuiShowFloat_command): Call _tui_vShowRegisters_commandSupport.
766 (_tuiShowGeneral_command): Likewise.
767 (_tuiShowSpecial_command): Likewise.
768 (_tuiToggleFloatRegs_command): Call tuiToggleFloatRegs.
769 * tuiWin.c (tui_scroll): Rename of tui_vScroll, update parameters.
770 (_tuiScrollForward_command): Call tui_scroll.
771 (_tuiScrollBackward_command): Likewise.
772 (_tuiScrollLeft_command): Likewise.
773 (_tuiScrollRight_command): Likewise.
774 (_tuiSetFocus_command): Call _tuiSetFocus.
775 (_tuiRefreshAll_command): Call tuiRefreshAll.
776 (_tuiSetWinHeight_command): Call _tuiSetWinHeight.
777 (_tuiXDBsetWinHeight_command): Call _tuiXDBsetWinHeight.
778 * tuiWin.h (tui_scroll): Rename of tui_vScroll, update parameters.
782 * tuiData.h (TuiLocatorElement): Use CORE_ADDR for address member.
783 (TuiLineOrAddress): Likewise.
784 * tuiDisassem.c (tuiGetBeginAsmAddress): Use CORE_ADDR to specify
786 (tuiSetDisassemContent): Likewise.
787 (tuiShowDisassem, tuiShowDisassemAndUpdateSource): Likewise.
788 * tuiLayout.c (_extractDisplayStartAddr): Likewise.
789 (tuiSetLayout): Likewise.
790 * tuiSourceWin.c (tuiDisplayMainFunction): Likewise.
791 (tuiUpdateSourceWindowsWithAddr): Likewise.
792 (tuiUpdateSourceWindowsWithLine): Likewise.
793 (tuiSetHasBreakAt): Likewise.
794 * tuiStack.c (tuiSetLocatorInfo): Likewise.
795 (tuiSwitchFilename): Likewise.
796 (tuiUpdateLocatorInfoFromFrame): Likewise.
797 (tuiSetLocatorContent): Likewise.
798 (tuiShowFrameInfo): Likewise.
799 * tuiDisassem.h: Update prototypes to use CORE_ADDR.
800 * tuiSourceWin.h: Likewise.
801 * tuiStack.h: Likewise.
805 * tuiWin.c: Add missing includes.
806 (_makeVisibleWithNewHeight): Fix call to find_line_pc.
807 * tuiLayout.c: Add missing includes.
808 (_initAndMakeWin): Don't put curses in echo mode.
809 (_extractDisplayStartAddr): Fix calls to find_line_pc.
810 (_tuiLayout_command): Missing ',' in warning call.
811 * tuiSourceWin.c (tuiUpdateSourceWindowsWithLine): Fix calls to
813 (tuiSetHasBreakAt): Check for null source file.
817 * tuiWin.c (_tuiSetFocus): Replace subsetCompare with subset_compare.
818 * tuiLayout.c (_tuiSetLayoutTo): Likewise.
819 * tui.c (_tui_vToggle_command): Likewise.
823 * tui-file.c: Add include of tuiIO.h, for tuiPuts_unfiltered.
827 * tuiRegs.c (tuiDisplayRegistersFrom): Set scrollok to FALSE in
828 each register window.
829 (tuiCheckRegisterValues): Use REGISTER_RAW_SIZE to obtain the size
830 of the register to check.
831 (_tuiRegValueHasChanged): Likewise.
832 (_tuiRegisterName): Use REGISTER_NAME.
833 (tui_restore_gdbout): New function.
834 (_tuiRegisterFormat): Use do_registers_info with gdb_stdout redirected
836 (START_SPECIAL_REGS): Define.
837 (_tuiGetRegisterRawValue): Use get_saved_register.
838 (_tuiDisplayRegister): Fix clearing of register window.
842 * tui-file.h (fputs_unfiltered_hook): Remove.
843 * tui-file.c (tui_file_flush): Remove fputs_unfiltered_hook.
844 (tui_file_fputs): Likewise; simplify
848 * tuiStack.c: Add missing includes.
849 (tuiShowFrameInfo): Don't crash when there is no symbol table
850 associated with the pc.
851 * tuiSource.c (_hasBreak): Check for null source file.
852 * tuiWin.c (tuiRefreshAll): Check for null winList[type].
853 (_tuiSetFocus): Check for null dataWin.
854 * tuiGeneralWin.c (refreshAll): Check for null list[type].
858 * tuiDisassem.c (tuiSetDisassemContent): Use tm_print_insn_info
859 to disassemble in the curses window.
863 * tui.h: Cleanup to avoid inclusion of curses includes.
864 (TuiGenWinInfo, TuiGenWinInfoPtr): Move from here.
865 * tuiData.h: To here; include curses includes here.
866 (setTermHeightTo): Rename of setTermHeight to follow reality.
867 (setTermWidthTo): Likewise with setTermWidth.
871 * tuiWin.c, tui.c, tuiCommand.c: Use ansi prototype.
872 tuiIO.c, tuiData.c: Likewise.
873 tuiDataWin.c, tuiDisassem.c: Likewise.
874 tuiGeneralWin.c, tuiLayout.c: Likewise.
875 tuiRegs.c, tuiSource.c: Likewise.
876 tuiSouceWin.c, tuiStack.c: Likewise.
880 * tuiWin.c, tuiWin.h, tui.c, tui.h, tuiCommand.c: Add FSF copyright.
881 tuiCommand.h, tuiIO.c, tuiIO.h, tuiData.h, tuiData.c: Likewise.
882 tuiDataWin.c, tuiDataWin.h, tuiDisassem.c, tuiDisassem.h: Likewise.
883 tuiGeneralWin.c, tuiGeneralWin.h, tuiLayout.c, tuiLayout.h: Likewise.
884 tuiRegs.c, tuiRegs.h, tuiSource.c, tuiSource.h: Likewise.
885 tuiSouceWin.c, tuiSourceWin.h, tuiStack.c, tuiStack.h: Likewise.
889 * tuiRegs.c: Use NUM_REGS, not ARCH_NUM_REGS.
893 * tui-file.h: Update/correct copyright notice.
897 * tui-file.c: Add __FILE__ and __LINE__ parameter to calls to
902 * tui-file.c, tui.c, tuiData.c, tuiLayout.c: Replace occurrences
903 of free() with xfree().
907 * tuiSourceWin.h: Eliminate use of PARAMS from this file.
911 * tuiLayout.c: Eliminate use of PARAMS from this file.
915 * tuiIO.c: Eliminate use of PARAMS from this file.
919 * tui-file.c: Include "tui.h", "tuiData.h", "tuiIO.h" and
921 (tui_file_fputs): Pass ``file'' and not ``stream'' to
922 tui_file_adjust_strbuf.
926 * tui.h: Include <ncurses.h> when available.
927 * tui.c, tuiGeneralWin.c: Do not include <curses.h>.
931 * Makefile.in: Delete.
935 * Makefile.in (distclean, maintainer-clean, realclean,
936 mostlyclean): New targets.
940 * tui-file.c, tui-file.h, tuiDisassem.c, tuiIO.c, tuiIO.h,
941 tuiRegs.c: Update to reflect rename of gdb-file / GDB_FILE to
942 ui-file / ``struct ui_file''.
946 * tui-file.c (enum streamtype, struct tui_stream, tui_file_new,
947 tui_file_delete, tui_fileopen, tui_sfileopen, tui_file_isatty,
948 tui_file_rewind, tui_file_put, tui_file_fputs,
949 tui_file_get_strbuf, tui_file_adjust_strbuf, tui_file_flush,
950 fputs_unfiltered_hook): Move to here from ../utils.c
952 * tui-file.h, tui-file.c: New files.
956 * tuiRegs.c (_tuiRegisterFormat), tuiDisassem.c
957 (tuiSetDisassemContent): Replace gdb_file_init_astring with
958 tui_sfileopen. Replace gdb_file_get_strbuf with
963 * tuiRegs.c (_tuiRegisterFormat), tuiDisassem.c
964 (tuiSetDisassemContent): Repace gdb_file_deallocate with
965 gdb_file_delete. Replace gdb_file_init_astring with tui_sfileopen.
969 * tuiSource.c: Include "source.h".
970 (open_source_file, find_source_lines): Delete declarations.
974 * tui.h: Include stdarg.h instead of varargs.h if we're on an ISO Cish
983 changes originally made by HP; HP did not create ChangeLog
986 * Makefile.in: New file; we're merging HP's changes into GDB, and
987 we've moved the TUI files into a subdirectory, so we need a new
991 #include <term.h>, if we have it, to get declarations for
992 the termcap functions on Solaris.
993 (tgoto): Add external K&R declaration for this; Solaris doesn't
994 bother to actually declare it in their header files.
995 (_tuiReset): Ignore the #definition of TIOCGETC if USG is defined;
996 we'd rather use the USG mechanisms than the Berkeley mechanisms
997 (TIOCGETC is one of the Berkeley terminal control ioctls).
998 Apologies if this causes trouble later; this should all be handled
1000 (strcat_to_buf, strcat_to_buf_with_fmt): New functions, moved here
1002 (tuiFree): replace safe_free with free.
1003 (strcat_to_buf): new function, copied from utils.c.
1004 (tuiInit): Add ignored `argv0' argument, to match the type that
1005 init_ui_hook expects; updated declaration. Call the
1006 initialize_tui_files function constructed above. Initialize
1008 (tuiInitWindows): Call tuiSetLocatorContent, to get the first
1009 element of the locator window's content allocated. This seems
1010 wrong, because it must have been initialized somehow in HP's
1011 sources, and we should do it the same way now. But we do get
1012 further before it segfaults. [Postscript: HP didn't bother to
1013 initialize it; they compile
1014 (va_catch_errors, vcatch_errors): Functions moved here from
1015 ../utils.c in HP's sources. They're not used anywhere else.
1016 (xdb_style): Delete this variable, and remove all references to
1017 it. It's always true.
1018 (tuiInit, _tui_vDo): References removed.
1020 * tui.h: Add prototypes.
1021 Don't #include "gendefs.h"; it's only used in the TUI.
1022 Integrate its contents into this file:
1023 #include <ansidecl.h> here.
1024 (Opaque, OpaqueFuncPtr): Typedefs moved to here.
1026 * tuiCommand.c: #include "defs.h", so we get the appropriate
1027 definition of GDB_FILE.
1030 (freeWindow): replace safe_free with free.
1031 (tui_version): don't define it here; it's defined in main.c now.
1034 (tuiSetDisassemContent): Call strcat_address_numeric instead of
1035 strcat_address. Simplify the control structure. Use predefined
1036 GDB function to print asm inst address. Use GDB_FILE to collect
1037 output into buffers.
1040 (tgoto): Add external K&R declaration for this here too.
1041 (tuiGetc, tuiTermSetup, tuiTermUnsetup): Same.
1042 (tuiPuts_unfiltered): change FILE to GDB_FILE.
1043 (tui_tputs): fix prototype for 3rd argument.
1045 * tuiIO.h (tuiPuts_unfiltered): change declaration.
1048 (_tuiSetLayoutTo): for displaying registers, hook up the HP code
1049 that decides which registers to display (i.e. single precision
1050 float, double precision float, general, special). Previously,
1051 only handled TUI_GENERAL_REGS. Now that the code is hooked up,
1052 compiling with -z poses a problem. When the first layout command
1053 is 'layout regs', dataWin->detail is a NULL pointer, and gdb
1056 * tuiLayout.c (_tuiSetLayoutTo): replace safe_free with free.
1058 * tuiRegs.c #include "defs.h" earlier, to avoid problems in
1059 <stdarg.h>. No idea exactly what's conflicting with what, but the
1061 (_tuiRegisterFormat): Change so that function creates a GDB_FILE
1062 object, calls pa_do_strcat_registers_info, copies the register
1063 info into a buffer, and deallocates the GDB_FILE object. Remove
1064 some code that is not executed. Also, call to
1065 pa_do_strcat_registers_info has an additional parameter,
1066 precision. This code requires some new per-target functions that
1067 we don't want to merge. Dyke it out, with #ifdef
1068 TUI_EXTENDED_FORMATTERS.
1069 (_tuiSetSpecialRegsContent): this function was ifdefed out.
1071 (_tuiSetGeneralAndSpecialRegsContent): this function was ifdefed
1073 (IS_64BIT): Just define this to be zero; we're not merging in the
1075 (tuiShowRegisters): Comment out all references to the "special"
1076 regs; we don't have a distinction between the "special" and
1077 "non-special" regs in most of our machine descriptions. This code
1078 is PA-specific in other ways as well, and needs to be redesigned
1079 to be portable to other processors.
1081 * tuiWin.c: #include <string.h>, to get a declaration for
1084 * tui.c, tuiCommand.c, tuiData.c, tuiDataWin.c, tuiDisassem.c,
1085 tuiGeneralWin.c, tuiIO.c, tuiLayout.c, tuiRegs.c, tuiSource.c,
1086 tuiSourceWin.c, tuiStack.c, tuiWin.c: New files (from HP). Changed
1087 bool to int throughout. Re-indented, GNU style.
1089 * tui.h, tuiCommand.h, tuiData.h, tuiDataWin.h, tuiDisassem.h,
1090 tuiGeneralWin.h, tuiIO.h, tuiLayout.h, tuiRegs.h, tuiSource.h,
1091 tuiSourceWin.h, tuiStack.h, tuiWin.h: new files (from HP).
1092 Changed bool to int throughout.