3 * tuiDisassem.c (tui_disassemble): Call gdb_print_insn, instead of
4 TARGET_PRINT_INSN. Do not initialize a disassemble_info object.
8 * tuiDisassem.c (tui_disassemble): Use
9 "deprecated_tm_print_insn_info" instead of TARGET_PRINT_INSN_INFO,
14 * tuiRegs.c (_tuiGetRegisterRawValue): Use frame_read_register,
15 instead of get_saved_register.
19 * tui-out.c (tui_out_data): Fix typedef.
23 * tui-out.c: Update copyright.
24 (tui_out_data): Define typedef. Use instead of ui_out_data.
28 * tui.c (tui_enable, tui_disable): Don't modify tui_version.
29 (tui_is_window_visible, tui_get_command_dimension): Test
30 tui_active instead of tui_version.
31 * tuiData.h (tui_version): Delete declaration.
32 * tui-hooks.c (tui_init_hook, tui_event_loop): Delete function,
33 moved to "tui-interp.c".
34 (tui_exit, tui_command_loop): Ditto.
35 (_initialize_tui): Don't initialize init_ui_hook. Initialize
36 target_new_objfile_hook.
37 * tui-interp.c: New file.
41 * tuiIO.c (tui_prep_terminal): Add one notused parameter.
42 * tui.c (tui_rl_switch_mode): Add two notused parameters.
43 (tui_rl_change_windows, tui_rl_next_keymap): Ditto.
44 (tui_rl_delete_other_windows): Ditto.
45 (tui_rl_change_windows, tui_rl_delete_other_windows): Update
50 Import of readline 4.3.
52 * tuiWin.c: Include readline/readline.h.
53 (tui_update_gdb_sizes): Use accessor function rl_get_screen_size.
54 (tuiResizeAll): Ditto.
58 * tuiStack.c (tuiShowFrameInfo): Fix typo.
62 * tui/tui-hooks.c: Update to use deprecated_selected_frame.
63 * tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto.
64 * tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
68 * tuiStack.c (tuiShowFrameInfo): Use find_frame_sal instead of
73 * tuiStack.c (tuiShowFrameInfo): Use get_frame_type instead of
74 deprecated_frame_in_dummy. Fix coding style.
78 * tui-hooks.c (tui_init_hook): Don't enable the TUI if a specific
79 interpreter is installed.
83 * tuiStack.c (tuiShowFrameInfo): Use get_frame_type instead of
84 signal_handler_caller.
88 * tuiStack.c (tuiShowFrameInfo): Replace frame_in_dummy with
89 deprecated_frame_in_dummy.
93 * tuiIO.c (tui_prep_terminal): Save the prompt registered in readline.
94 (tui_redisplay_readline): Use the last saved prompt.
95 (tui_rl_saved_prompt): New.
100 * tuiWin.c (ACS_LRCORNER, ACS_LLCORNER, ACS_ULCORNER, ACS_URCORNER,
101 ACS_HLINE, ACS_VLINE): Define if they don't exist.
106 * tuiIO.c (tui_initialize_io): Use setvbuf since this is portable.
110 * tui-hooks.c (selected_frame_level_changed_hook): Use the one
111 exported from frame.h.
115 * tui.c (tui_show_source): Don't access current_source_symtab, use
116 accessor function instead. Include source.h and symtab.h
117 * tuiDisassem.c (tuiShowDisassemAndUpdateSource,
118 tuiVerticalDisassemScroll): Use accessor functions for current
119 source line and symtab. Include source.h.
120 * tuiLayout.c (_extractDisplayStartAddr): Use accessor functions
121 for current source line and symtab. Include source.h.
122 * tuiWin.c (_makeVisibleWithNewHeight): Ditto.
123 * tuiSourceWin.c (tuiUpdateSourceWindowAsIs,
124 tuiHorizontalSourceScroll): Ditto.
125 * tuiSource.c (tuiVerticalSourceScroll): Ditto.
129 * tui.c (tui_rl_switch_mode): Remove unecessary TUI switch printfs.
130 (tui_initialize_readline): Allow to use space to leave SingleKey
131 to enter one gdb command.
132 (tui_enable): Restore the TUI keymap when we are back to TUI.
133 (tui_disable): Restore normal keymap when leaving TUI.
134 * tuiIO.c (tui_redisplay_readline): Restore the SingleKey mode
135 when the buffer becomes empty and we are in tui_one_command_mode.
139 * tuiIO.c (tui_setup_io): rl_already_prompted must be cleared
140 when leaving TUI mode so that gdb prompt is displayed.
144 * tuiStack.c (tui_make_status_line): Make sure the local buffer
145 is large enough to hold the complete line.
149 * tui-hooks.c (tui_event_loop): New function.
150 (tui_command_loop): New function to override gdb loop and make sure
151 uiout is set according to TUI mode.
152 (tui_command_loop): Install the specific TUI command hook.
153 * tuiIO.c (tui_initialize_io): Initialize tui_old_uiout.
154 (tui_uiout, tui_old_uiout): Make public.
155 * tuiIO.h (tui_uiout, tui_old_uiout): Declare.
159 * tuiIO.c (tui_putc): New function to print one character.
160 (printable_part): New function from readline/complete.c.
161 (PUTX): New macro, likewise.
162 (print_filename): New function, likewise.
163 (get_y_or_n): New function, likewise and adapted for TUI.
164 (tui_rl_display_match_list): New function from readline/complete.c
165 and writes on TUI command window.
166 (tui_setup_io): Install or remove the readline hook
167 rl_completion_display_matches_hook so that completion is written
168 directly in TUI command window instead of in the TUI pipe.
169 (tui_initialize_io): Use #ifdef TUI_USE_PIPE_FOR_READLINE for the
170 TUI redirection pipe.
171 (tui_getc): Likewise for call to tui_readline_output.
172 (tui_readline_output): Likewise for function.
173 * tui.c (tui_rl_startup_hook): Always take care of gdb prompt.
177 * tuiWin.c (_newHeightOk): Fix compilation warnings.
181 * tuiWin.c (_tuiAllWindowsInfo): Don't crash if the window
186 * tui-out.c (tui_out_new): Clear start_of_line.
187 * tuiSource.c (tuiVerticalSourceScroll): Use print_source_lines
188 to update the current source line.
192 * tui-hooks.c (tui_detach_hook): New hook to know when a process dies.
193 (tui_install_hooks): Install it.
194 (tui_remove_hooks): Remove it.
198 * tuiData.h (FILE_PREFIX): Don't define.
199 (blankStr, locationStr, breakStr): Don't declare.
200 (breakLocationStr, nullStr, historyLimit, setHistoryLimitTo): Likewise.
201 (displayableWinContentOf, displayableWinContentAt): Likewise.
202 (winElementHeight, winByName, freeAllWindows): Likewise.
204 * tuiData.c (blankStr, locationStr, breakStr): Remove.
205 (breakLocationStr, nullStr, historyLimit, setHistoryLimitTo): Remove.
206 (displayableWinContentOf, displayableWinContentAt): Remove.
207 (winElementHeight, winByName, freeAllWindows): Remove.
211 * tuiStack.c (tui_make_status_line): New function to create the
213 (tuiShowLocatorContent): Use it instead of displayableWinContentAt.
214 * tuiData.h (PROC_PREFIX): Use "In:" to reduce length of prefix.
215 (PC_PREFIX): Use upper case.
216 (SINGLE_KEY, MIN_LINE_WIDTH, MIN_PROC_WIDTH): Define.
217 (MAX_TARGET_WIDTH, MAX_PID_WIDTH): Define.
221 * tuiSourceWin.h (tuiUpdateAllExecInfos): Don't declare.
222 (tuiClearAllExecInfosContent): Likewise.
223 (tuiEraseAllExecInfosContent): Ditto.
224 (tuiUpdateSourceWindowsFromLocator): Ditto.
225 * tuiSourceWin.c (tuiUpdateAllExecInfos): Remove.
226 * tui.h (tui_vCheckDataValues): Don't declare.
227 (tui_vStartNewLines, tui_vAllSetHasBreakAt): Likewise.
228 (tui_vUpdateLocatorFilename, tui_vUpdateSourceWindowsWithAddr): Ditto.
229 (tui_vShowFrameInfo): Ditto.
233 * tui.c (tui_commands): Table of single key commands.
234 (tui_rl_command_key): New function to execute gdb command.
235 (tui_rl_command_mode): New function to temporarily leave SingleKey.
236 (tui_rl_next_keymap): New function to enter/leave the SingleKey mode.
237 (tui_rl_startup_hook): New function to avoid prompt display by
239 (tui_set_key_mode): New function to set the key mode and install
241 (tui_initialize_readline): Create TUI SingleKey readline map.
242 (tui_enable): Install rl_startup_hook.
243 (tui_disable): Remove it.
244 * tui.h (enum tui_key_mode): Declare.
245 (tui_set_key_mode, tui_current_key_mode): Declare.
246 * tuiIO.c (tui_redisplay_readline): Don't display the prompt in
248 * tuiIO.h (tui_redisplay_readline): Declare.
252 * tuiSourceWin.c (tuiSetIsExecPointAt): Redraw the previous and
257 * tuiSource.c (tuiSetSourceContent): Remove old breakpoint code.
259 (tuiShowSource): Fix comment indentation.
260 (tuiSourceIsDisplayed): Likewise.
261 (tuiVerticalSourceScroll): Likewise.
265 * tuiSourceWin.h (tui_update_all_breakpoint_info): Declare.
266 (tui_update_breakpoint_info): Declare.
267 (tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove.
269 * tuiSourceWin.c (tuiUpdateSourceWindowAsIs): Update breakpoint
270 information using tui_update_breakpoint_info.
271 (tui_update_all_breakpoint_info): New function to refresh all
273 (tui_update_breakpoint_info): New function to recompute the status
274 of exec info window from breakpoints.
275 (tuiSetHasBreakAt, tuiAllSetHasBreakAt): Remove.
276 (tuiSetExecInfoContent): Use the exec info flags computed by
277 tui_update_breakpoint_info to display a short status about breakpoints.
279 * tuiData.h (TuiExecInfoContent): New for exec info string.
280 (TuiWhichElement): Use it.
281 (TUI_BP_ENABLED, TUI_BP_DISABLED, TUI_BP_HIT): New defines.
282 (TUI_BP_CONDITIONAL, TUI_BP_HARDWARE): New defines.
283 (TUI_BP_HIT_POS, TUI_BP_BREAK_POS, TUI_EXEC_POS): Likewise.
284 (TUI_EXECINFO_SIZE): Likewise.
285 * tuiData.c (initContentElement): Clear exec info string.
287 * tui-hooks.c (get_breakpoint): Remove.
288 (tui_event_create_breakpoint): Call tui_update_all_breakpoint_info.
289 (tui_event_delete_breakpoint): Likewise.
290 (tui_event_modify_breakpoint): Likewise.
294 * tui.c (tuiGetLowDisassemblyAddress): Moved from here.
295 * tuiDisassem.c (tuiGetLowDisassemblyAddress): To here, and use
296 tui_find_disassembly_address to find the starting address of
301 * tuiDisassem.c (tui_disassemble): New function to disassemble
302 several lines in a buffer.
303 (tui_find_disassembly_address): New function to search backward
304 or forward a disassembly line.
305 (tuiSetDisassemContent): Use tui_disassemble to obtain the real
306 content and format it in the window.
307 (tuiShowDisassemAndUpdateSource): Remove unused locals.
308 (tuiVerticalDisassemScroll): Use tui_find_disassembly_address to
309 obtain the address to disassemble for the scrolling.
310 * tuiDisassem.h (tuiGetBeginAsmAddress): Update.
311 * tuiSourceWin.c (tuiUpdateSourceWindowAsIs): Don't pass symtab.
315 * tuiIO.c (CTRL_CHAR): Redefine and use readline 4.3 definition.
320 * tui.c (tui_disable): Update gdb's knowledge of its terminal
321 using target_terminal_save_ours.
322 (tui_enable): Likewise.
326 * tui.c (tui_rl_switch_mode): Renames tui_switch_mode.
327 (tui_rl_change_windows): Renames tui_change_windows.
328 (tui_rl_delete_other_windows): Renames tui_delete_other_windows.
329 (tui_initialize_readline): Update.
333 * tuiDisassem.c (tuiSetDisassemContent): Use breakpoint_here_p.
338 * tuiDisassem.c (tuiGetBeginAsmAddress): Use lookup_minimal_symbol
339 to find symbol address.
343 * tuiSourceWin.c (tui_display_main): Rename from tuiDisplayMainFunction
344 and use tuiGetBeginAsmAddress.
345 * tuiSourceWin.h (tui_display_main): Declare.
346 * tui.h (tuiDisplayMainFunction): Remove.
347 * tui-hooks.c (tui_new_objfile_hook): Update.
351 * tuiSource.h (m_tuiShowSourceAsIs): Remove macro.
352 (tuiShowSourceAsIs): Don't declare.
356 * tui-hooks.c (tui_selected_frame_level_changed_hook): Always update
361 * tuiStack.c (tuiSetLocatorContent): Remove.
362 (tuiUpdateLocatorInfoFromFrame): Remove.
363 (tui_set_locator_info): Allocate the content buffer if necessary.
364 (tui_set_locator_filename): Call tui_set_locator_info directly.
365 (tuiShowFrameInfo): Likewise and use find_pc_line instead of
370 * tuiSourceWin.c (tuiDisplayMainFunction): Update to use
371 tuiUpdateLocatorFilename.
372 * tuiStack.c (tuiSetLocatorInfo): Make it static.
373 (tuiSetLocatorContent): Likewise.
374 (tuiUpdateLocatorInfoFromFrame): Likewise.
375 (tuiSwitchFilename): Remove.
376 (tui_set_locator_filename): New function
377 (tui_set_locator_info): Rename from tuiSetLocatorInfo to GNU-ify;
378 use tui_set_locator_filename to record the filename.
379 (tuiUpdateLocatorFilename): Likewise.
380 (tuiUpdateLocatorInfoFromFrame): Update.
381 (tuiSetLocatorContent): Likewise.
382 * tuiStack.h (tuiClearLocatorContent): Don't declare.
383 (tuiSetLocatorInfo, tuiSetLocatorContent): Likewise.
384 (tuiUpdateLocatorInfoFromFrame, tuiSwitchFilename): Likewise.
388 * tuiSourceWin.c (tuiSetHasBreakAt): Use filename for breakpoint
390 * tuiSource.c (tuiSetSourceContent): Set window title and filename.
391 * tuiGeneralWin.c (boxWin): Print optional title on top of window.
392 * tuiData.h (TuiSourceInfo): Add filename member.
393 (TuiGenWinInfo): Add title member.
394 * tuiData.c (initGenericPart): Clear title.
395 (freeWindow): Free title and filename; remove unused locals.
396 (initWinInfo): Clear filename.
397 (tuiDelWindow): Free it; remove unused locals.
401 * tuiStack.h (tuiGetLocatorFilename): Don't declare.
402 (tuiUpdateLocatorDisplay): Likewise.
403 * tuiStack.c (tuiGetLocatorFilename): Remove.
404 (tuiShowFrameInfo): Use tuiSetLocatorContent and tuiShowLocatorContent
405 instead of tuiUpdateLocatorDisplay.
406 (tuiUpdateLocatorDisplay): Remove.
410 * tuiStack.h (tuiClearLocatorDisplay): Don't declare.
411 * tuiStack.c (tuiClearLocatorDisplay): Remove.
412 (tuiShowLocatorContent): Use wclrtoeol to clear end of status line.
413 (tuiUpdateLocatorDisplay): Don't call tuiClearLocatorDisplay.
417 * tuiStack.c (tui_get_function_from_frame): Rename from
418 _getFuncNameFromFrame; use print_address_symbolic to get symbolic
420 (tuiUpdateLocatorInfoFromFrame): Update.
424 * tuiRegs.c (tuiDisplayRegistersFrom): Remove unused locals.
425 (_tuiRegisterFormat, _tuiSetSpecialRegsContent): Likewise.
426 (_tuiSetGeneralAndSpecialRegsContent): Likewise.
427 (_tuiSetFloatRegsContent): Likewise.
428 (_tuiRegisterName): Return a const char*.
429 * tuiData.h (_TuiDataElement): Use const char* for name.
433 * tuiSourceWin.h (tuiEraseAllSourceContent): Don't declare.
434 (tuiShowAllExecInfosContent): Likewise.
435 * tuiSourceWin.c (tuiEraseAllSourceContent): Remove.
436 (tuiShowAllExecInfosContent): Remove.
437 (tuiAllocSourceBuffer): Remove unused locals.
441 * tuiStack.c (tui_update_command): Rename _tuiUpdateLocation_command
442 to follow other gdb's command names; use execute_command; cleanup.
443 (_initialize_tuiStack): Update.
447 * tuiWin.h (tui_update_gdb_sizes): Declare.
451 * tui.c (strcat_to_buf): Use const char* for source item.
452 (tui_enable): Update the windows if there is a selected frame.
453 * tui.h (strcat_to_buf): Update prototype.
454 (strcat_to_buf_with_fmt): Remove.
458 * tuiWin.c (tui_update_gdb_sizes): New function to tell gdb what
459 is the size of command window.
460 (tuiResizeAll): Call it instead of init_page_info.
461 * tui.c (tui_enable): Call it to resize to TUI command window.
462 (tui_disable): Likewise for plain screen.
466 * tui.c (tui_enable): Use tuiSetLayout instead of showLayout and
467 use tuiShowFrameInfo instead of tuiSetLocatorContent.
468 * tuiLayout.h (showLayout): Remove.
469 * tuiLayout.c (_showSourceOrDisassemAndCommand): Remove unused locals.
470 (_showSourceDisassemCommand): Likewise.
471 (showLayout): Make it static.
472 (lastLayout): Remove.
476 * tuiSourceWin.c (tui_show_source_line): New function.
477 (tuiShowSourceContent): Call it and avoid clearing the window before
479 (tuiClearAllSourceWinsContent): Remove.
480 * tuiSourceWin.h (tuiClearAllSourceWinsContent): Don't declare.
481 * tuiWin.h (tuiClearWinFocus, tuiClearWinFocusFrom): Don't declare.
482 * tuiWin.c (tuiClearWinFocus, tuiClearWinFocusFrom): Remove.
483 (tuiRefreshAll): Don't clear the window.
484 (_makeVisibleWithNewHeight): Don't clear locator line.
485 (tuiResizeAll): Remove unused locals.
486 (_tuiAdjustWinHeights): Likewise.
487 (_makeInvisibleAndSetNewHeight): Likewise.
488 (_newHeightOk): Likewise.
489 * tuiLayout.c (showLayout): Don't clear source windows.
490 (tuiSetLayout): Don't clear the window.
491 (_initAndMakeWin): Likewise for status line.
492 * tuiGeneralWin.c (makeVisible): Don't clear or refresh the window.
493 (makeWindow): Likewise.
494 (tuiClearWin): Remove.
495 * tuiGeneralWin.h (tuiClearWin): Don't declare.
499 * tuiSourceWin.c (tuiSrcWinIsDisplayed): Remove.
500 (tuiAsmWinIsDisplayed): Remove.
501 (tuiShowAllSourceWinsContent): Remove.
502 (tuiUpdateOnEnd): Remove.
503 * tuiGeneralWin.c (scrollWinForward): Remove.
504 (scrollWinBackward): Remove.
505 (_winResize): Don't declare.
506 * tui.h (tuiUpdateOnEnd): Don't declare.
507 (vcatch_errors, va_catch_errors): Likewise.
508 * tuiSourceWin.h (tuiUpdateOnEnd): Likewise.
509 (tuiShowAllSourceWinsContent): Likewise.
510 * tuiGeneralWin.h (scrollWinForward): Likewise.
511 (scrollWinBackward): Likewise.
515 * tuiRegs.c (_tuiRegisterFormat): Use gdbarch_print_registers_info.
520 * tui.c: Disable <termio.h> include.
524 * tui-out.c (XMALLOC): Delete macro. Update copyright.
528 * tui-hooks.c: Add FIXME to explain true/false problem. Update
530 * tui.c, tuiCommand.c, tuiData.c, tuiDataWin.c: Ditto.
531 * tuiDisassem.c, tuiGeneralWin.c, tuiIO.c, tuiLayout.c: Ditto.
532 * tuiRegs.c, tuiSource.c, tuiSourceWin.c, tuiStack.c: Ditto.
536 * tui-hooks.c: Include <curses.h> before "bfd.h".
538 * tuiCommand.c: Likewise.
539 * tuiData.c: Likewise.
540 * tuiDataWin.c: Likewise.
541 * tuiDisassem.c: Likewise.
542 * tuiGeneralWin.c: Likewise.
544 * tuiLayout.c: Likewise.
545 * tuiRegs.c: Likewise.
546 * tuiSource.c: Likewise.
547 * tuiSourceWin.c: Likewise.
548 * tuiStack.c: Likewise.
549 * tuiWin.c: Likewise.
553 * tuiWin.c (_initialize_tuiWin): Replace NO_FUNCTION with NULL.
557 * tuiDisassem.c: Include "value.h".
558 * tuiSourceWin.c: Ditto.
562 * tuiLayout.h (tui_set_layout): Don't declare.
563 * tui.h (tui_vAddWinToLayout): Don't declare.
564 (tui_vSetLayoutTo): Likewise.
565 (tui_set_layout): Declare.
569 * tuiSourceWin.c: Use disp_del instead of del.
571 * tuiSource.c: Use disp_del instead of del.
573 * tuiDisassem.c: Use disp_del instead of del.
577 * tui.c (tui_enable): Remove call to terminal_save_ours().
578 (tui_disable): Likewise.
582 * tuiWin.c (_initialize_tuiWin): Use specific tui prefix for
583 set/show configuration variables.
584 (show_tui_cmd): New function.
585 (set_tui_cmd): New function.
589 * tui-hooks.c: New file, gdb hooks for tui.
590 * tui-out.c: New file, image copied from cli-out.c.
591 (tui_field_int): Identify "line" fields and keep track of them.
592 (tui_field_string): Likewise for "file".
593 (tui_out_new): Use flags = 0 to avoid printing the sources.
597 * tuiIO.c (tui_cont_sig): Update cursor position on the screen to
598 leave it in the command window.
599 (tui_redisplay_readline): Save cursor position to restore the
600 cursor after we go back from background.
601 * tuiData.h (TuiCommandInfo): Add start_line member.
605 * tuiStack.c (tuiUpdateLocatorFilename): Use const char*.
606 * tuiStack.h (tuiUpdateLocatorFilename): Update prototype.
607 * tuiWin.c (_initialize_tuiWin): Don't cast table of enum in calls
609 * tui.c (tui_show_source): New function.
610 (tuiGetLowDisassemblyAddress): Use CORE_ADDR for newLow.
611 (tui_switch_mode): Prep or deprep readline terminal;
612 make sure the \n we return does not redo the last command.
613 * tui.h (tui_show_source): Declare.
614 (tui_out_new, tui_install_hooks, tui_remove_hooks): Likewise.
615 (tui_active, tui_initialize_io, tui_initialize_readline): Likewise.
619 * tuiIO.c (tui_initialize_io): Install tui_cont_sig signal handler
620 if SIGCONT is defined.
621 (tui_cont_sig): New function when SIGCONT is defined.
622 (tui_setup_io): Save tty setting to restore by SIGCONT.
626 * tui.h (tui_show_assembly): Declare.
627 (tui_is_window_visible): Declare.
628 * tui.c (tui_show_assembly): New function.
629 (tui_is_window_visible): New function.
630 (tui_get_command_dimension): New function.
634 * tuiWin.c (tuiRefreshAll): Use clearok to force a refresh.
638 * tui-file.c (tui_file_fputs): Use tui_puts.
642 * tuiStack.c (tuiSetLocatorInfo): Cleanup.
643 * tuiStack.h (tuiGetLocatorFilename): Declare.
644 * tuiRegs.h (tuiFirstRegElementNoInLine): Declare.
645 * tuiData.h (addToSourceWindows): Declare.
649 * tui.c (tui_change_windows): New function.
650 (tui_delete_other_windows): New function.
651 (tui_initialize_readline): Bind them to C-X 1 and C-X 2.
652 (tui_enable): Enable the keypad; call tui_update_variables.
653 (strcat_to_buf_with_fmt): Remove.
657 * tui.h: Remove old declarations, add the new ones.
658 * tui.c (tui_switch_mode): New function.
659 (tui_initialize_readline): New function.
660 (tui_enable): New function.
661 (tui_disable): New function.
662 (tuiGetLowDisassemblyAddress): Use CORE_ADDR, cleanup.
663 (tui_vSelectSourceSymtab): Remove.
664 (tuiInitWindows): Remove.
665 (_initialize_tui): Remove.
666 (_tuiReset): Keep but put arround #if 0.
670 * tuiIO.h: Remove old declarations and add the new ones.
671 * tuiIO.c: New management for curses and gdb terminal interactions.
673 (tuiTermSetup, tuiTermUnsetup): Remove, must use normal curses ops.
674 (tuiBufferGetc, tui_vStartNewLines, _updateCommandInfo): Remove.
675 (tui_owns_terminal): Remove.
676 (tui_redisplay_readline): New function.
677 (tui_puts): New function.
678 (tui_prep_terminal): New function.
679 (tui_deprep_terminal): New function.
680 (tui_getc): Rename of tuiGetc, simplify and fix.
681 (tui_setup_io): New function.
682 (tui_initialize_io): New function.
686 * tuiRegs.c (tuiDisplayRegistersFrom): Call touchwin.
687 (_tuiRegisterFormat): Reduce size of format result.
691 * tuiGeneralWin.c (boxWin): Use the tui configuration variables.
692 * tuiWin.h: Declare the new variables.
693 * tuiWin.c (_initialize_tuiWin): Create TUI configuration variables.
694 (tui_update_variables): New function.
695 (translate): New function.
696 (tui_border_kind_enums, tui_border_mode_enums): New tables.
697 (tui_border_mode_translate): New table.
698 (tui_border_kind_translate_*): New tables.
699 (tui_active_border_mode): New variables.
700 (tui_border_*): New variables.
704 * tuiWin.c (_parseScrollingArgs): Fix uninitialized variable.
705 (_makeVisibleWithNewHeight): Use TuiLineOrAddress type.
707 * tuiStack.c (tuiShowFrameInfo): Use TuiLineOrAddress type.
708 (tui_vUpdateLocatorFilename): Remove.
709 * tuiStack.h: Update prototypes.
711 * tuiSourceWin.c (tuiAddrIsDisplayed): New function.
712 (tuiLineIsDisplayed): Split for address and line.
713 (tuiUpdateSourceWindow): Use TuiLineOrAddress type.
714 (tuiUpdateSourceWindowAsIs): Likewise.
715 (tuiUpdateSourceWindowsWithAddr): Likewise.
716 (tuiUpdateSourceWindowsWithLine): Likewise.
717 (tuiHorizontalSourceScroll): Likewise.
718 (tuiSetIsExecPointAt): Likewise.
719 (tuiUpdateOnEnd): Likewise.
720 * tuiSourceWin.h: Update prototypes.
722 * tuiSource.c (tuiVerticalSourceScroll): Use TuiLineOrAddress type.
723 (tuiShowSource): Likewise.
724 (tuiVerticalSourceScroll): Likewise.
725 * tuiSource.h (tuiShowSource): Update prototype.
727 * tuiDisassem.c (tuiSetDisassemContent): Use CORE_ADDR for address.
728 (tuiShowDisassem): Use TuiLineOrAddress type.
729 (tuiShowDisassemAndUpdateSource): Likewise.
730 (tuiVerticalDisassemScroll): Likewise.
731 (tuiShowDisassemAsIs): Remove.
732 * tuiDisassem.h (tuiSetDisassemContent): Update prototype.
734 * tuiData.c (initWinInfo): Use CORE_ADDR for address.
735 (clearWinDetail): Likewise.
736 (displayableWinContentOf): Fix address conversion.
737 (tuiNextWin): Fix crash when the window is not yet created.
738 (partialWinByName): Likewise.
742 * tuiSourceWin.h: Remove unused declarations.
743 * tuiSourceWin.c (tui_vUpdateSourceWindowsWithAddr): Remove.
744 (tui_vUpdateSourceWindowsWithLine): Remove.
745 (tui_vAllSetHasBreakAt): Remove.
747 * tuiLayout.h (tui_set_layout): Declare.
748 (tui_vSetLayoutTo): Remove.
749 (tui_vAddWinToLayout): Remove.
750 * tuiLayout.c (_tuiLayout_command): Call tui_enable() to force TUI.
751 (_tuiToggleLayout_command): Remove.
752 (_tuiToggleSplitLayout_command): Remove.
753 (_tuiLayout_command): Remove.
754 (tui_vSetLayoutTo): Remove.
755 (tui_vAddWinToLayout): Remove.
757 * tuiDataWin.h (tui_vCheckDataValues): Remove.
758 * tuiDataWin.c (tui_vCheckDataValues): Remove.
762 * tuiWin.c (tuiStrDup): Remove, replaced by xstrdup.
763 (_parseScrollingArgs): Use xstrdup.
764 (_tuiScrollForward_command): Call tui_enable() to force TUI mode.
765 (_tuiScrollBackward_command): Likewise.
766 (_tuiScrollLeft_command): Likewise.
767 (_tuiScrollRight_command): Likewise.
768 (_tuiSetFocus): Likewise.
769 (_tuiSetFocus_command): Likewise.
770 (_tuiRefreshAll_command): Likewise.
771 (_tuiSetTabWidth_command): Likewise.
772 (_tuiSetWinHeight): Likewise.
773 (_tuiSetWinHeight_command): Likewise.
774 (_tuiXDBsetWinHeight): Likewise.
775 (_tui_vSetFocus): Remove.
776 (_tui_vSetWinHeight): Remove.
777 (_tui_vXDBsetWinHeight): Remove.
781 * tuiCommand.h: Remove unused declarations.
782 * tuiCommand.c (tuiDispatchCtrlChar): Fix escape sequences.
783 (tuiIncrCommandCharCountBy): Remove.
784 (tuiDecrCommandCharCountBy): Remove.
785 (tuiSetCommandCharCountTo): Remove.
786 (tuiClearCommandCharCount): Remove.
790 * tuiWin.c (_initialize_tuiWin): Always define the tui commands;
791 create the tui class help.
792 * tuiLayout.c (_initialize_tuiLayout): Always define the tui commands.
793 * tuiRegs.c (_initialize_tuiRegs): Likewise.
794 * tuiStack.c (_initialize_tuiStack): Likewise.
798 * tuiDisassem.c (tuiVerticalDisassemScroll): Use CORE_ADDR.
799 (tuiVerticalDisassemScroll): Likewise.
800 (tuiShowDisassemAndUpdateSource): Check for null symtab to
805 * tuiIO.c (_tuiHandleResizeDuringIO): Call tuiRefreshAll.
806 (tuiRead, tui_vread): Remove.
808 * tui.c (va_catch_errors, tuiDo, tuiDoAndReturnToTop): Remove.
809 (vcatch_errors, _tui_vDo): Remove.
810 * tui.h (tuiDo, tuiDoAndReturnToTop): Remove.
812 * tuiLayout.c (tuiSetLayout): Remove vcatch_errors.
813 (tui_set_layout): Rename of _tuiSetLayoutTo, public.
814 (_tuiToggleLayout_command): Merge with _tui_vToggleLayout_command.
815 (_tuiToggleSplitLayout_command): Merge with _tui_vToggleSplitLayout_command.
816 (_tuiLayout_command): Call tui_set_layout.
818 * tuiRegs.c (_tuiScrollRegsBackward_command): Call tui_scroll.
819 (_tuiScrollRegsForward_command): Likewise.
820 (_tuiShowFloat_command): Call _tui_vShowRegisters_commandSupport.
821 (_tuiShowGeneral_command): Likewise.
822 (_tuiShowSpecial_command): Likewise.
823 (_tuiToggleFloatRegs_command): Call tuiToggleFloatRegs.
824 * tuiWin.c (tui_scroll): Rename of tui_vScroll, update parameters.
825 (_tuiScrollForward_command): Call tui_scroll.
826 (_tuiScrollBackward_command): Likewise.
827 (_tuiScrollLeft_command): Likewise.
828 (_tuiScrollRight_command): Likewise.
829 (_tuiSetFocus_command): Call _tuiSetFocus.
830 (_tuiRefreshAll_command): Call tuiRefreshAll.
831 (_tuiSetWinHeight_command): Call _tuiSetWinHeight.
832 (_tuiXDBsetWinHeight_command): Call _tuiXDBsetWinHeight.
833 * tuiWin.h (tui_scroll): Rename of tui_vScroll, update parameters.
837 * tuiData.h (TuiLocatorElement): Use CORE_ADDR for address member.
838 (TuiLineOrAddress): Likewise.
839 * tuiDisassem.c (tuiGetBeginAsmAddress): Use CORE_ADDR to specify
841 (tuiSetDisassemContent): Likewise.
842 (tuiShowDisassem, tuiShowDisassemAndUpdateSource): Likewise.
843 * tuiLayout.c (_extractDisplayStartAddr): Likewise.
844 (tuiSetLayout): Likewise.
845 * tuiSourceWin.c (tuiDisplayMainFunction): Likewise.
846 (tuiUpdateSourceWindowsWithAddr): Likewise.
847 (tuiUpdateSourceWindowsWithLine): Likewise.
848 (tuiSetHasBreakAt): Likewise.
849 * tuiStack.c (tuiSetLocatorInfo): Likewise.
850 (tuiSwitchFilename): Likewise.
851 (tuiUpdateLocatorInfoFromFrame): Likewise.
852 (tuiSetLocatorContent): Likewise.
853 (tuiShowFrameInfo): Likewise.
854 * tuiDisassem.h: Update prototypes to use CORE_ADDR.
855 * tuiSourceWin.h: Likewise.
856 * tuiStack.h: Likewise.
860 * tuiWin.c: Add missing includes.
861 (_makeVisibleWithNewHeight): Fix call to find_line_pc.
862 * tuiLayout.c: Add missing includes.
863 (_initAndMakeWin): Don't put curses in echo mode.
864 (_extractDisplayStartAddr): Fix calls to find_line_pc.
865 (_tuiLayout_command): Missing ',' in warning call.
866 * tuiSourceWin.c (tuiUpdateSourceWindowsWithLine): Fix calls to
868 (tuiSetHasBreakAt): Check for null source file.
872 * tuiWin.c (_tuiSetFocus): Replace subsetCompare with subset_compare.
873 * tuiLayout.c (_tuiSetLayoutTo): Likewise.
874 * tui.c (_tui_vToggle_command): Likewise.
878 * tui-file.c: Add include of tuiIO.h, for tuiPuts_unfiltered.
882 * tuiRegs.c (tuiDisplayRegistersFrom): Set scrollok to FALSE in
883 each register window.
884 (tuiCheckRegisterValues): Use REGISTER_RAW_SIZE to obtain the size
885 of the register to check.
886 (_tuiRegValueHasChanged): Likewise.
887 (_tuiRegisterName): Use REGISTER_NAME.
888 (tui_restore_gdbout): New function.
889 (_tuiRegisterFormat): Use do_registers_info with gdb_stdout redirected
891 (START_SPECIAL_REGS): Define.
892 (_tuiGetRegisterRawValue): Use get_saved_register.
893 (_tuiDisplayRegister): Fix clearing of register window.
897 * tui-file.h (fputs_unfiltered_hook): Remove.
898 * tui-file.c (tui_file_flush): Remove fputs_unfiltered_hook.
899 (tui_file_fputs): Likewise; simplify
903 * tuiStack.c: Add missing includes.
904 (tuiShowFrameInfo): Don't crash when there is no symbol table
905 associated with the pc.
906 * tuiSource.c (_hasBreak): Check for null source file.
907 * tuiWin.c (tuiRefreshAll): Check for null winList[type].
908 (_tuiSetFocus): Check for null dataWin.
909 * tuiGeneralWin.c (refreshAll): Check for null list[type].
913 * tuiDisassem.c (tuiSetDisassemContent): Use tm_print_insn_info
914 to disassemble in the curses window.
918 * tui.h: Cleanup to avoid inclusion of curses includes.
919 (TuiGenWinInfo, TuiGenWinInfoPtr): Move from here.
920 * tuiData.h: To here; include curses includes here.
921 (setTermHeightTo): Rename of setTermHeight to follow reality.
922 (setTermWidthTo): Likewise with setTermWidth.
926 * tuiWin.c, tui.c, tuiCommand.c: Use ansi prototype.
927 tuiIO.c, tuiData.c: Likewise.
928 tuiDataWin.c, tuiDisassem.c: Likewise.
929 tuiGeneralWin.c, tuiLayout.c: Likewise.
930 tuiRegs.c, tuiSource.c: Likewise.
931 tuiSouceWin.c, tuiStack.c: Likewise.
935 * tuiWin.c, tuiWin.h, tui.c, tui.h, tuiCommand.c: Add FSF copyright.
936 tuiCommand.h, tuiIO.c, tuiIO.h, tuiData.h, tuiData.c: Likewise.
937 tuiDataWin.c, tuiDataWin.h, tuiDisassem.c, tuiDisassem.h: Likewise.
938 tuiGeneralWin.c, tuiGeneralWin.h, tuiLayout.c, tuiLayout.h: Likewise.
939 tuiRegs.c, tuiRegs.h, tuiSource.c, tuiSource.h: Likewise.
940 tuiSouceWin.c, tuiSourceWin.h, tuiStack.c, tuiStack.h: Likewise.
944 * tuiRegs.c: Use NUM_REGS, not ARCH_NUM_REGS.
948 * tui-file.h: Update/correct copyright notice.
952 * tui-file.c: Add __FILE__ and __LINE__ parameter to calls to
957 * tui-file.c, tui.c, tuiData.c, tuiLayout.c: Replace occurrences
958 of free() with xfree().
962 * tuiSourceWin.h: Eliminate use of PARAMS from this file.
966 * tuiLayout.c: Eliminate use of PARAMS from this file.
970 * tuiIO.c: Eliminate use of PARAMS from this file.
974 * tui-file.c: Include "tui.h", "tuiData.h", "tuiIO.h" and
976 (tui_file_fputs): Pass ``file'' and not ``stream'' to
977 tui_file_adjust_strbuf.
981 * tui.h: Include <ncurses.h> when available.
982 * tui.c, tuiGeneralWin.c: Do not include <curses.h>.
986 * Makefile.in: Delete.
990 * Makefile.in (distclean, maintainer-clean, realclean,
991 mostlyclean): New targets.
995 * tui-file.c, tui-file.h, tuiDisassem.c, tuiIO.c, tuiIO.h,
996 tuiRegs.c: Update to reflect rename of gdb-file / GDB_FILE to
997 ui-file / ``struct ui_file''.
1001 * tui-file.c (enum streamtype, struct tui_stream, tui_file_new,
1002 tui_file_delete, tui_fileopen, tui_sfileopen, tui_file_isatty,
1003 tui_file_rewind, tui_file_put, tui_file_fputs,
1004 tui_file_get_strbuf, tui_file_adjust_strbuf, tui_file_flush,
1005 fputs_unfiltered_hook): Move to here from ../utils.c
1007 * tui-file.h, tui-file.c: New files.
1011 * tuiRegs.c (_tuiRegisterFormat), tuiDisassem.c
1012 (tuiSetDisassemContent): Replace gdb_file_init_astring with
1013 tui_sfileopen. Replace gdb_file_get_strbuf with
1014 tui_file_get_strbuf.
1018 * tuiRegs.c (_tuiRegisterFormat), tuiDisassem.c
1019 (tuiSetDisassemContent): Repace gdb_file_deallocate with
1020 gdb_file_delete. Replace gdb_file_init_astring with tui_sfileopen.
1024 * tuiSource.c: Include "source.h".
1025 (open_source_file, find_source_lines): Delete declarations.
1029 * tui.h: Include stdarg.h instead of varargs.h if we're on an ISO Cish
1038 changes originally made by HP; HP did not create ChangeLog
1041 * Makefile.in: New file; we're merging HP's changes into GDB, and
1042 we've moved the TUI files into a subdirectory, so we need a new
1046 #include <term.h>, if we have it, to get declarations for
1047 the termcap functions on Solaris.
1048 (tgoto): Add external K&R declaration for this; Solaris doesn't
1049 bother to actually declare it in their header files.
1050 (_tuiReset): Ignore the #definition of TIOCGETC if USG is defined;
1051 we'd rather use the USG mechanisms than the Berkeley mechanisms
1052 (TIOCGETC is one of the Berkeley terminal control ioctls).
1053 Apologies if this causes trouble later; this should all be handled
1055 (strcat_to_buf, strcat_to_buf_with_fmt): New functions, moved here
1057 (tuiFree): replace safe_free with free.
1058 (strcat_to_buf): new function, copied from utils.c.
1059 (tuiInit): Add ignored `argv0' argument, to match the type that
1060 init_ui_hook expects; updated declaration. Call the
1061 initialize_tui_files function constructed above. Initialize
1063 (tuiInitWindows): Call tuiSetLocatorContent, to get the first
1064 element of the locator window's content allocated. This seems
1065 wrong, because it must have been initialized somehow in HP's
1066 sources, and we should do it the same way now. But we do get
1067 further before it segfaults. [Postscript: HP didn't bother to
1068 initialize it; they compile
1069 (va_catch_errors, vcatch_errors): Functions moved here from
1070 ../utils.c in HP's sources. They're not used anywhere else.
1071 (xdb_style): Delete this variable, and remove all references to
1072 it. It's always true.
1073 (tuiInit, _tui_vDo): References removed.
1075 * tui.h: Add prototypes.
1076 Don't #include "gendefs.h"; it's only used in the TUI.
1077 Integrate its contents into this file:
1078 #include <ansidecl.h> here.
1079 (Opaque, OpaqueFuncPtr): Typedefs moved to here.
1081 * tuiCommand.c: #include "defs.h", so we get the appropriate
1082 definition of GDB_FILE.
1085 (freeWindow): replace safe_free with free.
1086 (tui_version): don't define it here; it's defined in main.c now.
1089 (tuiSetDisassemContent): Call strcat_address_numeric instead of
1090 strcat_address. Simplify the control structure. Use predefined
1091 GDB function to print asm inst address. Use GDB_FILE to collect
1092 output into buffers.
1095 (tgoto): Add external K&R declaration for this here too.
1096 (tuiGetc, tuiTermSetup, tuiTermUnsetup): Same.
1097 (tuiPuts_unfiltered): change FILE to GDB_FILE.
1098 (tui_tputs): fix prototype for 3rd argument.
1100 * tuiIO.h (tuiPuts_unfiltered): change declaration.
1103 (_tuiSetLayoutTo): for displaying registers, hook up the HP code
1104 that decides which registers to display (i.e. single precision
1105 float, double precision float, general, special). Previously,
1106 only handled TUI_GENERAL_REGS. Now that the code is hooked up,
1107 compiling with -z poses a problem. When the first layout command
1108 is 'layout regs', dataWin->detail is a NULL pointer, and gdb
1111 * tuiLayout.c (_tuiSetLayoutTo): replace safe_free with free.
1113 * tuiRegs.c #include "defs.h" earlier, to avoid problems in
1114 <stdarg.h>. No idea exactly what's conflicting with what, but the
1116 (_tuiRegisterFormat): Change so that function creates a GDB_FILE
1117 object, calls pa_do_strcat_registers_info, copies the register
1118 info into a buffer, and deallocates the GDB_FILE object. Remove
1119 some code that is not executed. Also, call to
1120 pa_do_strcat_registers_info has an additional parameter,
1121 precision. This code requires some new per-target functions that
1122 we don't want to merge. Dyke it out, with #ifdef
1123 TUI_EXTENDED_FORMATTERS.
1124 (_tuiSetSpecialRegsContent): this function was ifdefed out.
1126 (_tuiSetGeneralAndSpecialRegsContent): this function was ifdefed
1128 (IS_64BIT): Just define this to be zero; we're not merging in the
1130 (tuiShowRegisters): Comment out all references to the "special"
1131 regs; we don't have a distinction between the "special" and
1132 "non-special" regs in most of our machine descriptions. This code
1133 is PA-specific in other ways as well, and needs to be redesigned
1134 to be portable to other processors.
1136 * tuiWin.c: #include <string.h>, to get a declaration for
1139 * tui.c, tuiCommand.c, tuiData.c, tuiDataWin.c, tuiDisassem.c,
1140 tuiGeneralWin.c, tuiIO.c, tuiLayout.c, tuiRegs.c, tuiSource.c,
1141 tuiSourceWin.c, tuiStack.c, tuiWin.c: New files (from HP). Changed
1142 bool to int throughout. Re-indented, GNU style.
1144 * tui.h, tuiCommand.h, tuiData.h, tuiDataWin.h, tuiDisassem.h,
1145 tuiGeneralWin.h, tuiIO.h, tuiLayout.h, tuiRegs.h, tuiSource.h,
1146 tuiSourceWin.h, tuiStack.h, tuiWin.h: new files (from HP).
1147 Changed bool to int throughout.