xref: /dflybsd-src/contrib/gdb-7/gdb/tui/tui-winsource.h (revision de8e141f24382815c10a4012d209bbbf7abf1112)
15796c8dcSSimon Schubert /* TUI display source/assembly window.
25796c8dcSSimon Schubert 
3*ef5ccd6cSJohn Marino    Copyright (C) 1998-2013 Free Software Foundation, Inc.
45796c8dcSSimon Schubert 
55796c8dcSSimon Schubert    Contributed by Hewlett-Packard Company.
65796c8dcSSimon Schubert 
75796c8dcSSimon Schubert    This file is part of GDB.
85796c8dcSSimon Schubert 
95796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
105796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
115796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
125796c8dcSSimon Schubert    (at your option) any later version.
135796c8dcSSimon Schubert 
145796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
155796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
165796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
175796c8dcSSimon Schubert    GNU General Public License for more details.
185796c8dcSSimon Schubert 
195796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
205796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
215796c8dcSSimon Schubert 
225796c8dcSSimon Schubert #ifndef TUI_SOURCEWIN_H
235796c8dcSSimon Schubert #define TUI_SOURCEWIN_H
245796c8dcSSimon Schubert 
255796c8dcSSimon Schubert #include "tui/tui-data.h"
265796c8dcSSimon Schubert 
275796c8dcSSimon Schubert struct tui_win_info;
285796c8dcSSimon Schubert 
295796c8dcSSimon Schubert /* Update the execution windows to show the active breakpoints.  This
305796c8dcSSimon Schubert    is called whenever a breakpoint is inserted, removed or has its
315796c8dcSSimon Schubert    state changed.  */
325796c8dcSSimon Schubert extern void tui_update_all_breakpoint_info (void);
335796c8dcSSimon Schubert 
345796c8dcSSimon Schubert /* Scan the source window and the breakpoints to update the hasBreak
355796c8dcSSimon Schubert    information for each line.  Returns 1 if something changed and the
365796c8dcSSimon Schubert    execution window must be refreshed.  */
375796c8dcSSimon Schubert extern int tui_update_breakpoint_info (struct tui_win_info *win,
385796c8dcSSimon Schubert 				       int current_only);
395796c8dcSSimon Schubert 
405796c8dcSSimon Schubert /* Function to display the "main" routine.  */
415796c8dcSSimon Schubert extern void tui_display_main (void);
425796c8dcSSimon Schubert extern void tui_update_source_window (struct tui_win_info *,
435796c8dcSSimon Schubert 				      struct gdbarch *, struct symtab *,
445796c8dcSSimon Schubert 				      struct tui_line_or_address,
455796c8dcSSimon Schubert 				      int);
465796c8dcSSimon Schubert extern void tui_update_source_window_as_is (struct tui_win_info *,
475796c8dcSSimon Schubert 					    struct gdbarch *, struct symtab *,
485796c8dcSSimon Schubert 					    struct tui_line_or_address,
495796c8dcSSimon Schubert 					    int);
505796c8dcSSimon Schubert extern void tui_update_source_windows_with_addr (struct gdbarch *, CORE_ADDR);
515796c8dcSSimon Schubert extern void tui_update_source_windows_with_line (struct symtab *,
525796c8dcSSimon Schubert 						 int);
535796c8dcSSimon Schubert extern void tui_clear_source_content (struct tui_win_info *, int);
545796c8dcSSimon Schubert extern void tui_erase_source_content (struct tui_win_info *, int);
555796c8dcSSimon Schubert extern void tui_show_source_content (struct tui_win_info *);
565796c8dcSSimon Schubert extern void tui_horizontal_source_scroll (struct tui_win_info *,
575796c8dcSSimon Schubert 					  enum tui_scroll_direction,
585796c8dcSSimon Schubert 					  int);
595796c8dcSSimon Schubert extern enum tui_status tui_set_exec_info_content (struct tui_win_info *);
605796c8dcSSimon Schubert extern void tui_show_exec_info_content (struct tui_win_info *);
615796c8dcSSimon Schubert extern void tui_erase_exec_info_content (struct tui_win_info *);
625796c8dcSSimon Schubert extern void tui_clear_exec_info_content (struct tui_win_info *);
635796c8dcSSimon Schubert extern void tui_update_exec_info (struct tui_win_info *);
645796c8dcSSimon Schubert 
655796c8dcSSimon Schubert extern void tui_set_is_exec_point_at (struct tui_line_or_address,
665796c8dcSSimon Schubert 				      struct tui_win_info *);
675796c8dcSSimon Schubert extern enum tui_status tui_alloc_source_buffer (struct tui_win_info *);
685796c8dcSSimon Schubert extern int tui_line_is_displayed (int,
695796c8dcSSimon Schubert 				  struct tui_win_info *,
705796c8dcSSimon Schubert 				  int);
715796c8dcSSimon Schubert extern int tui_addr_is_displayed (CORE_ADDR,
725796c8dcSSimon Schubert 				  struct tui_win_info *,
735796c8dcSSimon Schubert 				  int);
745796c8dcSSimon Schubert 
755796c8dcSSimon Schubert 
765796c8dcSSimon Schubert /* Constant definitions. */
775796c8dcSSimon Schubert #define SCROLL_THRESHOLD 2	/* Threshold for lazy scroll.  */
785796c8dcSSimon Schubert 
795796c8dcSSimon Schubert #endif
80