2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c, tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c, tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h, tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c, tui-winsource.h, tui.c, tui.h: Function declarations and definitions, wrap long lines.
This commit is contained in:
parent
ef5eab5a0f
commit
08ef48c5ac
@ -1,5 +1,12 @@
|
||||
2007-08-14 Michael Snyder <msnyder@access-company.com>
|
||||
|
||||
* tui-data.c, tui-data.h, tui-disasm.c, tui-disasm.h, tui-hooks.c,
|
||||
tui-io.c, tui-layout.c, tui-layout.h, tui-out.c, tui-regs.c,
|
||||
tui-source.c, tui-source.h, tui-stack.c, tui-win.c, tui-win.h,
|
||||
tui-windata.c, tui-windata.h, tui-wingeneral.c, tui-winsource.c,
|
||||
tui-winsource.h, tui.c, tui.h: Function declarations and
|
||||
definitions, wrap long lines.
|
||||
|
||||
* tui-command.c, tui-data.c, tui-disasm.c, tui-layout.c,
|
||||
tui-regs.c, tui-win.c, tui-windata.c, tui-winsource.c, tui.c:
|
||||
Reformat block comments to GNU standard.
|
||||
|
@ -47,19 +47,24 @@ static struct tui_win_info *src_win_list[2];
|
||||
static struct tui_list source_windows = {src_win_list, 0};
|
||||
static int default_tab_len = DEFAULT_TAB_LEN;
|
||||
static struct tui_win_info *win_with_focus = (struct tui_win_info *) NULL;
|
||||
static struct tui_layout_def layout_def =
|
||||
{SRC_WIN, /* DISPLAY_MODE */
|
||||
FALSE, /* SPLIT */
|
||||
TUI_UNDEFINED_REGS, /* REGS_DISPLAY_TYPE */
|
||||
TUI_SFLOAT_REGS}; /* FLOAT_REGS_DISPLAY_TYPE */
|
||||
static struct tui_layout_def layout_def = {
|
||||
SRC_WIN, /* DISPLAY_MODE */
|
||||
FALSE, /* SPLIT */
|
||||
TUI_UNDEFINED_REGS, /* REGS_DISPLAY_TYPE */
|
||||
TUI_SFLOAT_REGS}; /* FLOAT_REGS_DISPLAY_TYPE */
|
||||
|
||||
static int win_resized = FALSE;
|
||||
|
||||
|
||||
/*********************************
|
||||
** Static function forward decls
|
||||
**********************************/
|
||||
static void free_content (tui_win_content, int, enum tui_win_type);
|
||||
static void free_content_elements (tui_win_content, int, enum tui_win_type);
|
||||
static void free_content (tui_win_content,
|
||||
int,
|
||||
enum tui_win_type);
|
||||
static void free_content_elements (tui_win_content,
|
||||
int,
|
||||
enum tui_win_type);
|
||||
|
||||
|
||||
|
||||
@ -82,12 +87,13 @@ tui_win_is_auxillary (enum tui_win_type win_type)
|
||||
int
|
||||
tui_win_has_locator (struct tui_win_info *win_info)
|
||||
{
|
||||
return (win_info != NULL \
|
||||
return (win_info != NULL
|
||||
&& win_info->detail.source_info.has_locator);
|
||||
}
|
||||
|
||||
void
|
||||
tui_set_win_highlight (struct tui_win_info *win_info, int highlight)
|
||||
tui_set_win_highlight (struct tui_win_info *win_info,
|
||||
int highlight)
|
||||
{
|
||||
if (win_info != NULL)
|
||||
win_info->is_highlighted = highlight;
|
||||
@ -309,7 +315,8 @@ tui_set_current_layout_to (enum tui_layout_type new_layout)
|
||||
|
||||
/* Set the origin of the window. */
|
||||
void
|
||||
set_gen_win_origin (struct tui_gen_win_info *win_info, int x, int y)
|
||||
set_gen_win_origin (struct tui_gen_win_info *win_info,
|
||||
int x, int y)
|
||||
{
|
||||
win_info->origin.x = x;
|
||||
win_info->origin.y = y;
|
||||
@ -477,7 +484,8 @@ tui_init_generic_part (struct tui_gen_win_info *win)
|
||||
/* init_content_element().
|
||||
*/
|
||||
void
|
||||
init_content_element (struct tui_win_element *element, enum tui_win_type type)
|
||||
init_content_element (struct tui_win_element *element,
|
||||
enum tui_win_type type)
|
||||
{
|
||||
element->highlight = FALSE;
|
||||
switch (type)
|
||||
@ -627,7 +635,8 @@ tui_alloc_content (int num_elements, enum tui_win_type type)
|
||||
there is a memory allocation error, in which case, (-1) is
|
||||
returned. */
|
||||
int
|
||||
tui_add_content_elements (struct tui_gen_win_info *win_info, int num_elements)
|
||||
tui_add_content_elements (struct tui_gen_win_info *win_info,
|
||||
int num_elements)
|
||||
{
|
||||
struct tui_win_element *element_ptr;
|
||||
int i, index_start;
|
||||
@ -809,7 +818,8 @@ tui_free_win_content (struct tui_gen_win_info *win_info)
|
||||
|
||||
|
||||
void
|
||||
tui_del_data_windows (tui_win_content content, int content_size)
|
||||
tui_del_data_windows (tui_win_content content,
|
||||
int content_size)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -831,7 +841,8 @@ tui_del_data_windows (tui_win_content content, int content_size)
|
||||
|
||||
|
||||
void
|
||||
tui_free_data_content (tui_win_content content, int content_size)
|
||||
tui_free_data_content (tui_win_content content,
|
||||
int content_size)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -850,8 +861,8 @@ tui_free_data_content (tui_win_content content, int content_size)
|
||||
}
|
||||
}
|
||||
free_content (content,
|
||||
content_size,
|
||||
DATA_WIN);
|
||||
content_size,
|
||||
DATA_WIN);
|
||||
}
|
||||
|
||||
|
||||
@ -861,7 +872,9 @@ tui_free_data_content (tui_win_content content, int content_size)
|
||||
|
||||
|
||||
static void
|
||||
free_content (tui_win_content content, int content_size, enum tui_win_type win_type)
|
||||
free_content (tui_win_content content,
|
||||
int content_size,
|
||||
enum tui_win_type win_type)
|
||||
{
|
||||
if (content != (tui_win_content) NULL)
|
||||
{
|
||||
@ -874,7 +887,9 @@ free_content (tui_win_content content, int content_size, enum tui_win_type win_t
|
||||
/* free_content_elements().
|
||||
*/
|
||||
static void
|
||||
free_content_elements (tui_win_content content, int content_size, enum tui_win_type type)
|
||||
free_content_elements (tui_win_content content,
|
||||
int content_size,
|
||||
enum tui_win_type type)
|
||||
{
|
||||
if (content != (tui_win_content) NULL)
|
||||
{
|
||||
|
@ -37,50 +37,50 @@ struct tui_point
|
||||
/* Generic window information. */
|
||||
struct tui_gen_win_info
|
||||
{
|
||||
WINDOW *handle; /* Window handle. */
|
||||
enum tui_win_type type; /* Type of window. */
|
||||
int width; /* Window width. */
|
||||
int height; /* Window height. */
|
||||
struct tui_point origin; /* Origin of window. */
|
||||
void **content; /* Content of window. */
|
||||
int content_size; /* Size of content (# of elements). */
|
||||
int content_in_use; /* Can it be used, or is it already used? */
|
||||
int viewport_height; /* Viewport height. */
|
||||
int last_visible_line; /* Index of last visible line. */
|
||||
int is_visible; /* Whether the window is visible or not. */
|
||||
char *title; /* Window title to display. */
|
||||
WINDOW *handle; /* Window handle. */
|
||||
enum tui_win_type type; /* Type of window. */
|
||||
int width; /* Window width. */
|
||||
int height; /* Window height. */
|
||||
struct tui_point origin; /* Origin of window. */
|
||||
void **content; /* Content of window. */
|
||||
int content_size; /* Size of content (# of elements). */
|
||||
int content_in_use; /* Can it be used, or is it already used? */
|
||||
int viewport_height; /* Viewport height. */
|
||||
int last_visible_line; /* Index of last visible line. */
|
||||
int is_visible; /* Whether the window is visible or not. */
|
||||
char *title; /* Window title to display. */
|
||||
};
|
||||
|
||||
/* Constant definitions. */
|
||||
#define DEFAULT_TAB_LEN 8
|
||||
#define NO_SRC_STRING "[ No Source Available ]"
|
||||
#define NO_DISASSEM_STRING "[ No Assembly Available ]"
|
||||
#define NO_REGS_STRING "[ Register Values Unavailable ]"
|
||||
#define NO_DATA_STRING "[ No Data Values Displayed ]"
|
||||
#define MAX_CONTENT_COUNT 100
|
||||
#define SRC_NAME "SRC"
|
||||
#define CMD_NAME "CMD"
|
||||
#define DATA_NAME "REGS"
|
||||
#define DISASSEM_NAME "ASM"
|
||||
#define TUI_NULL_STR ""
|
||||
#define DEFAULT_HISTORY_COUNT 25
|
||||
#define BOX_WINDOW TRUE
|
||||
#define DONT_BOX_WINDOW FALSE
|
||||
#define HILITE TRUE
|
||||
#define NO_HILITE FALSE
|
||||
#define WITH_LOCATOR TRUE
|
||||
#define NO_LOCATOR FALSE
|
||||
#define EMPTY_SOURCE_PROMPT TRUE
|
||||
#define NO_EMPTY_SOURCE_PROMPT FALSE
|
||||
#define UNDEFINED_ITEM -1
|
||||
#define MIN_WIN_HEIGHT 3
|
||||
#define MIN_CMD_WIN_HEIGHT 3
|
||||
#define DEFAULT_TAB_LEN 8
|
||||
#define NO_SRC_STRING "[ No Source Available ]"
|
||||
#define NO_DISASSEM_STRING "[ No Assembly Available ]"
|
||||
#define NO_REGS_STRING "[ Register Values Unavailable ]"
|
||||
#define NO_DATA_STRING "[ No Data Values Displayed ]"
|
||||
#define MAX_CONTENT_COUNT 100
|
||||
#define SRC_NAME "SRC"
|
||||
#define CMD_NAME "CMD"
|
||||
#define DATA_NAME "REGS"
|
||||
#define DISASSEM_NAME "ASM"
|
||||
#define TUI_NULL_STR ""
|
||||
#define DEFAULT_HISTORY_COUNT 25
|
||||
#define BOX_WINDOW TRUE
|
||||
#define DONT_BOX_WINDOW FALSE
|
||||
#define HILITE TRUE
|
||||
#define NO_HILITE FALSE
|
||||
#define WITH_LOCATOR TRUE
|
||||
#define NO_LOCATOR FALSE
|
||||
#define EMPTY_SOURCE_PROMPT TRUE
|
||||
#define NO_EMPTY_SOURCE_PROMPT FALSE
|
||||
#define UNDEFINED_ITEM -1
|
||||
#define MIN_WIN_HEIGHT 3
|
||||
#define MIN_CMD_WIN_HEIGHT 3
|
||||
|
||||
/* Strings to display in the TUI status line. */
|
||||
#define PROC_PREFIX "In: "
|
||||
#define LINE_PREFIX "Line: "
|
||||
#define PC_PREFIX "PC: "
|
||||
#define SINGLE_KEY "(SingleKey)"
|
||||
#define PROC_PREFIX "In: "
|
||||
#define LINE_PREFIX "Line: "
|
||||
#define PC_PREFIX "PC: "
|
||||
#define SINGLE_KEY "(SingleKey)"
|
||||
|
||||
/* Minimum/Maximum length of some fields displayed in the TUI status
|
||||
line. */
|
||||
@ -182,7 +182,8 @@ struct tui_source_element
|
||||
struct tui_data_element
|
||||
{
|
||||
const char *name;
|
||||
int item_no; /* The register number, or data display number. */
|
||||
int item_no; /* The register number, or data display
|
||||
number. */
|
||||
enum tui_data_type type;
|
||||
void *value;
|
||||
int highlight;
|
||||
@ -317,8 +318,10 @@ extern struct tui_win_info *tui_alloc_win_info (enum tui_win_type);
|
||||
extern void tui_init_generic_part (struct tui_gen_win_info *);
|
||||
extern void tui_init_win_info (struct tui_win_info *);
|
||||
extern tui_win_content tui_alloc_content (int, enum tui_win_type);
|
||||
extern int tui_add_content_elements (struct tui_gen_win_info *, int);
|
||||
extern void tui_init_content_element (struct tui_win_element *, enum tui_win_type);
|
||||
extern int tui_add_content_elements (struct tui_gen_win_info *,
|
||||
int);
|
||||
extern void tui_init_content_element (struct tui_win_element *,
|
||||
enum tui_win_type);
|
||||
extern void tui_free_window (struct tui_win_info *);
|
||||
extern void tui_free_win_content (struct tui_gen_win_info *);
|
||||
extern void tui_free_data_content (tui_win_content, int);
|
||||
@ -333,14 +336,15 @@ extern int tui_term_height (void);
|
||||
extern void tui_set_term_height_to (int);
|
||||
extern int tui_term_width (void);
|
||||
extern void tui_set_term_width_to (int);
|
||||
extern void tui_set_gen_win_origin (struct tui_gen_win_info *, int, int);
|
||||
extern void tui_set_gen_win_origin (struct tui_gen_win_info *,
|
||||
int, int);
|
||||
extern struct tui_gen_win_info *tui_locator_win_info_ptr (void);
|
||||
extern struct tui_gen_win_info *tui_source_exec_info_win_ptr (void);
|
||||
extern struct tui_gen_win_info *tui_disassem_exec_info_win_ptr (void);
|
||||
extern struct tui_list *tui_source_windows (void);
|
||||
extern void tui_clear_source_windows (void);
|
||||
extern void tui_clear_source_windows_detail (void);
|
||||
extern void tui_clear_win_detail (struct tui_win_info *win_info);
|
||||
extern void tui_clear_win_detail (struct tui_win_info *);
|
||||
extern void tui_add_to_source_windows (struct tui_win_info *);
|
||||
extern int tui_default_tab_len (void);
|
||||
extern void tui_set_default_tab_len (int);
|
||||
@ -353,6 +357,6 @@ extern void tui_set_win_resized_to (int);
|
||||
extern struct tui_win_info *tui_next_win (struct tui_win_info *);
|
||||
extern struct tui_win_info *tui_prev_win (struct tui_win_info *);
|
||||
|
||||
extern void tui_add_to_source_windows (struct tui_win_info *win_info);
|
||||
extern void tui_add_to_source_windows (struct tui_win_info *);
|
||||
|
||||
#endif /* TUI_DATA_H */
|
||||
|
@ -51,7 +51,8 @@ struct tui_asm_line
|
||||
Disassemble count lines starting at pc.
|
||||
Return address of the count'th instruction after pc. */
|
||||
static CORE_ADDR
|
||||
tui_disassemble (struct tui_asm_line *asm_lines, CORE_ADDR pc, int count)
|
||||
tui_disassemble (struct tui_asm_line *asm_lines,
|
||||
CORE_ADDR pc, int count)
|
||||
{
|
||||
struct ui_file *gdb_dis_out;
|
||||
|
||||
@ -355,7 +356,8 @@ tui_get_begin_asm_address (void)
|
||||
disassembly window. This may or may not be the same as the low
|
||||
address input. */
|
||||
CORE_ADDR
|
||||
tui_get_low_disassembly_address (CORE_ADDR low, CORE_ADDR pc)
|
||||
tui_get_low_disassembly_address (CORE_ADDR low,
|
||||
CORE_ADDR pc)
|
||||
{
|
||||
int pos;
|
||||
|
||||
|
@ -31,7 +31,8 @@
|
||||
extern enum tui_status tui_set_disassem_content (CORE_ADDR);
|
||||
extern void tui_show_disassem (CORE_ADDR);
|
||||
extern void tui_show_disassem_and_update_source (CORE_ADDR);
|
||||
extern void tui_vertical_disassem_scroll (enum tui_scroll_direction, int);
|
||||
extern void tui_vertical_disassem_scroll (enum tui_scroll_direction,
|
||||
int);
|
||||
extern CORE_ADDR tui_get_begin_asm_address (void);
|
||||
|
||||
#endif
|
||||
|
@ -167,8 +167,7 @@ tui_event_default (int number)
|
||||
|
||||
static struct gdb_events *tui_old_event_hooks;
|
||||
|
||||
static struct gdb_events tui_event_hooks =
|
||||
{
|
||||
static struct gdb_events tui_event_hooks = {
|
||||
tui_event_create_breakpoint,
|
||||
tui_event_delete_breakpoint,
|
||||
tui_event_modify_breakpoint,
|
||||
@ -180,7 +179,8 @@ static struct gdb_events tui_event_hooks =
|
||||
/* Called when going to wait for the target.
|
||||
Leave curses mode and setup program mode. */
|
||||
static ptid_t
|
||||
tui_target_wait_hook (ptid_t pid, struct target_waitstatus *status)
|
||||
tui_target_wait_hook (ptid_t pid,
|
||||
struct target_waitstatus *status)
|
||||
{
|
||||
ptid_t res;
|
||||
|
||||
@ -246,8 +246,10 @@ tui_selected_frame_level_changed_hook (int level)
|
||||
|
||||
/* Called from print_frame_info to list the line we stopped in. */
|
||||
static void
|
||||
tui_print_frame_info_listing_hook (struct symtab *s, int line,
|
||||
int stopline, int noerror)
|
||||
tui_print_frame_info_listing_hook (struct symtab *s,
|
||||
int line,
|
||||
int stopline,
|
||||
int noerror)
|
||||
{
|
||||
select_source_symtab (s);
|
||||
tui_show_frame_info (get_selected_frame (NULL));
|
||||
|
@ -78,7 +78,8 @@ key_is_command_char (int ch)
|
||||
|
||||
/* Use definition from readline 4.3. */
|
||||
#undef CTRL_CHAR
|
||||
#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0))
|
||||
#define CTRL_CHAR(c) \
|
||||
((c) < control_character_threshold && (((c) & 0x80) == 0))
|
||||
|
||||
/* This file controls the IO interactions between gdb and curses.
|
||||
When the TUI is enabled, gdb has two modes a curses and a standard
|
||||
@ -404,7 +405,8 @@ static void
|
||||
tui_rl_display_match_list (char **matches, int len, int max)
|
||||
{
|
||||
typedef int QSFUNC (const void *, const void *);
|
||||
extern int _rl_qsort_string_compare (const void*, const void*);
|
||||
extern int _rl_qsort_string_compare (const void *,
|
||||
const void *);
|
||||
extern int _rl_print_completions_horizontally;
|
||||
|
||||
int count, limit, printed_len;
|
||||
|
@ -46,10 +46,15 @@
|
||||
** Static Local Decls
|
||||
********************************/
|
||||
static void show_layout (enum tui_layout_type);
|
||||
static void init_gen_win_info (struct tui_gen_win_info *, enum tui_win_type, int, int, int, int);
|
||||
static void *init_and_make_win (void *, enum tui_win_type, int, int, int, int, int);
|
||||
static void init_gen_win_info (struct tui_gen_win_info *,
|
||||
enum tui_win_type,
|
||||
int, int, int, int);
|
||||
static void *init_and_make_win (void *, enum tui_win_type,
|
||||
int, int, int, int, int);
|
||||
static void show_source_or_disasm_and_command (enum tui_layout_type);
|
||||
static void make_source_or_disasm_window (struct tui_win_info **, enum tui_win_type, int, int);
|
||||
static void make_source_or_disasm_window (struct tui_win_info **,
|
||||
enum tui_win_type,
|
||||
int, int);
|
||||
static void make_command_window (struct tui_win_info **, int, int);
|
||||
static void make_source_window (struct tui_win_info **, int, int);
|
||||
static void make_disasm_window (struct tui_win_info **, int, int);
|
||||
@ -309,7 +314,8 @@ tui_add_win_to_layout (enum tui_win_type type)
|
||||
answer what the height of a window would be based upon its type and
|
||||
the layout. */
|
||||
int
|
||||
tui_default_win_height (enum tui_win_type type, enum tui_layout_type layout)
|
||||
tui_default_win_height (enum tui_win_type type,
|
||||
enum tui_layout_type layout)
|
||||
{
|
||||
int h;
|
||||
|
||||
@ -634,7 +640,8 @@ prev_layout (void)
|
||||
|
||||
|
||||
static void
|
||||
make_command_window (struct tui_win_info **win_info_ptr, int height, int origin_y)
|
||||
make_command_window (struct tui_win_info **win_info_ptr,
|
||||
int height, int origin_y)
|
||||
{
|
||||
*win_info_ptr = init_and_make_win (*win_info_ptr,
|
||||
CMD_WIN,
|
||||
@ -651,7 +658,8 @@ make_command_window (struct tui_win_info **win_info_ptr, int height, int origin_
|
||||
/* make_source_window().
|
||||
*/
|
||||
static void
|
||||
make_source_window (struct tui_win_info **win_info_ptr, int height, int origin_y)
|
||||
make_source_window (struct tui_win_info **win_info_ptr,
|
||||
int height, int origin_y)
|
||||
{
|
||||
make_source_or_disasm_window (win_info_ptr, SRC_WIN, height, origin_y);
|
||||
|
||||
@ -662,7 +670,8 @@ make_source_window (struct tui_win_info **win_info_ptr, int height, int origin_y
|
||||
/* make_disasm_window().
|
||||
*/
|
||||
static void
|
||||
make_disasm_window (struct tui_win_info **win_info_ptr, int height, int origin_y)
|
||||
make_disasm_window (struct tui_win_info **win_info_ptr,
|
||||
int height, int origin_y)
|
||||
{
|
||||
make_source_or_disasm_window (win_info_ptr, DISASSEM_WIN, height, origin_y);
|
||||
|
||||
@ -671,7 +680,8 @@ make_disasm_window (struct tui_win_info **win_info_ptr, int height, int origin_y
|
||||
|
||||
|
||||
static void
|
||||
make_data_window (struct tui_win_info **win_info_ptr, int height, int origin_y)
|
||||
make_data_window (struct tui_win_info **win_info_ptr,
|
||||
int height, int origin_y)
|
||||
{
|
||||
*win_info_ptr = init_and_make_win (*win_info_ptr,
|
||||
DATA_WIN,
|
||||
@ -721,18 +731,18 @@ show_source_disasm_command (void)
|
||||
else
|
||||
{
|
||||
init_gen_win_info (&TUI_SRC_WIN->generic,
|
||||
TUI_SRC_WIN->generic.type,
|
||||
src_height,
|
||||
TUI_SRC_WIN->generic.width,
|
||||
TUI_SRC_WIN->detail.source_info.execution_info->width,
|
||||
0);
|
||||
TUI_SRC_WIN->generic.type,
|
||||
src_height,
|
||||
TUI_SRC_WIN->generic.width,
|
||||
TUI_SRC_WIN->detail.source_info.execution_info->width,
|
||||
0);
|
||||
TUI_SRC_WIN->can_highlight = TRUE;
|
||||
init_gen_win_info (TUI_SRC_WIN->detail.source_info.execution_info,
|
||||
EXEC_INFO_WIN,
|
||||
src_height,
|
||||
3,
|
||||
0,
|
||||
0);
|
||||
EXEC_INFO_WIN,
|
||||
src_height,
|
||||
3,
|
||||
0,
|
||||
0);
|
||||
tui_make_visible (&TUI_SRC_WIN->generic);
|
||||
tui_make_visible (TUI_SRC_WIN->detail.source_info.execution_info);
|
||||
TUI_SRC_WIN->detail.source_info.has_locator = FALSE;;
|
||||
@ -756,25 +766,24 @@ show_source_disasm_command (void)
|
||||
else
|
||||
{
|
||||
init_gen_win_info (locator,
|
||||
LOCATOR_WIN,
|
||||
2 /* 1 */ ,
|
||||
tui_term_width (),
|
||||
0,
|
||||
(src_height + asm_height) - 1);
|
||||
LOCATOR_WIN,
|
||||
2 /* 1 */ ,
|
||||
tui_term_width (),
|
||||
0,
|
||||
(src_height + asm_height) - 1);
|
||||
TUI_DISASM_WIN->detail.source_info.has_locator = TRUE;
|
||||
init_gen_win_info (
|
||||
&TUI_DISASM_WIN->generic,
|
||||
TUI_DISASM_WIN->generic.type,
|
||||
asm_height,
|
||||
TUI_DISASM_WIN->generic.width,
|
||||
TUI_DISASM_WIN->detail.source_info.execution_info->width,
|
||||
src_height - 1);
|
||||
init_gen_win_info (&TUI_DISASM_WIN->generic,
|
||||
TUI_DISASM_WIN->generic.type,
|
||||
asm_height,
|
||||
TUI_DISASM_WIN->generic.width,
|
||||
TUI_DISASM_WIN->detail.source_info.execution_info->width,
|
||||
src_height - 1);
|
||||
init_gen_win_info (TUI_DISASM_WIN->detail.source_info.execution_info,
|
||||
EXEC_INFO_WIN,
|
||||
asm_height,
|
||||
3,
|
||||
0,
|
||||
src_height - 1);
|
||||
EXEC_INFO_WIN,
|
||||
asm_height,
|
||||
3,
|
||||
0,
|
||||
src_height - 1);
|
||||
TUI_DISASM_WIN->can_highlight = TRUE;
|
||||
tui_make_visible (&TUI_DISASM_WIN->generic);
|
||||
tui_make_visible (TUI_DISASM_WIN->detail.source_info.execution_info);
|
||||
@ -789,16 +798,16 @@ show_source_disasm_command (void)
|
||||
|
||||
if (TUI_CMD_WIN == NULL)
|
||||
make_command_window (&TUI_CMD_WIN,
|
||||
cmd_height,
|
||||
tui_term_height () - cmd_height);
|
||||
cmd_height,
|
||||
tui_term_height () - cmd_height);
|
||||
else
|
||||
{
|
||||
init_gen_win_info (&TUI_CMD_WIN->generic,
|
||||
TUI_CMD_WIN->generic.type,
|
||||
TUI_CMD_WIN->generic.height,
|
||||
TUI_CMD_WIN->generic.width,
|
||||
0,
|
||||
TUI_CMD_WIN->generic.origin.y);
|
||||
TUI_CMD_WIN->generic.type,
|
||||
TUI_CMD_WIN->generic.height,
|
||||
TUI_CMD_WIN->generic.width,
|
||||
0,
|
||||
TUI_CMD_WIN->generic.origin.y);
|
||||
TUI_CMD_WIN->can_highlight = FALSE;
|
||||
tui_make_visible (&TUI_CMD_WIN->generic);
|
||||
}
|
||||
@ -849,25 +858,25 @@ show_data (enum tui_layout_type new_layout)
|
||||
else
|
||||
{
|
||||
init_gen_win_info (&tui_win_list[win_type]->generic,
|
||||
tui_win_list[win_type]->generic.type,
|
||||
src_height,
|
||||
tui_win_list[win_type]->generic.width,
|
||||
tui_win_list[win_type]->detail.source_info.execution_info->width,
|
||||
data_height - 1);
|
||||
tui_win_list[win_type]->generic.type,
|
||||
src_height,
|
||||
tui_win_list[win_type]->generic.width,
|
||||
tui_win_list[win_type]->detail.source_info.execution_info->width,
|
||||
data_height - 1);
|
||||
init_gen_win_info (tui_win_list[win_type]->detail.source_info.execution_info,
|
||||
EXEC_INFO_WIN,
|
||||
src_height,
|
||||
3,
|
||||
0,
|
||||
data_height - 1);
|
||||
EXEC_INFO_WIN,
|
||||
src_height,
|
||||
3,
|
||||
0,
|
||||
data_height - 1);
|
||||
tui_make_visible (&tui_win_list[win_type]->generic);
|
||||
tui_make_visible (tui_win_list[win_type]->detail.source_info.execution_info);
|
||||
init_gen_win_info (locator,
|
||||
LOCATOR_WIN,
|
||||
2 /* 1 */ ,
|
||||
tui_term_width (),
|
||||
0,
|
||||
total_height - 1);
|
||||
LOCATOR_WIN,
|
||||
2 /* 1 */ ,
|
||||
tui_term_width (),
|
||||
0,
|
||||
total_height - 1);
|
||||
}
|
||||
tui_win_list[win_type]->detail.source_info.has_locator = TRUE;
|
||||
tui_make_visible (locator);
|
||||
@ -879,8 +888,10 @@ show_data (enum tui_layout_type new_layout)
|
||||
/* init_gen_win_info().
|
||||
*/
|
||||
static void
|
||||
init_gen_win_info (struct tui_gen_win_info *win_info, enum tui_win_type type,
|
||||
int height, int width, int origin_x, int origin_y)
|
||||
init_gen_win_info (struct tui_gen_win_info *win_info,
|
||||
enum tui_win_type type,
|
||||
int height, int width,
|
||||
int origin_x, int origin_y)
|
||||
{
|
||||
int h = height;
|
||||
|
||||
@ -904,8 +915,10 @@ init_gen_win_info (struct tui_gen_win_info *win_info, enum tui_win_type type,
|
||||
/* init_and_make_win().
|
||||
*/
|
||||
static void *
|
||||
init_and_make_win (void *opaque_win_info, enum tui_win_type win_type,
|
||||
int height, int width, int origin_x, int origin_y,
|
||||
init_and_make_win (void *opaque_win_info,
|
||||
enum tui_win_type win_type,
|
||||
int height, int width,
|
||||
int origin_x, int origin_y,
|
||||
int box_it)
|
||||
{
|
||||
struct tui_gen_win_info *generic;
|
||||
@ -939,8 +952,9 @@ init_and_make_win (void *opaque_win_info, enum tui_win_type win_type,
|
||||
|
||||
|
||||
static void
|
||||
make_source_or_disasm_window (struct tui_win_info **win_info_ptr, enum tui_win_type type,
|
||||
int height, int origin_y)
|
||||
make_source_or_disasm_window (struct tui_win_info **win_info_ptr,
|
||||
enum tui_win_type type,
|
||||
int height, int origin_y)
|
||||
{
|
||||
struct tui_gen_win_info *execution_info = (struct tui_gen_win_info *) NULL;
|
||||
|
||||
@ -986,7 +1000,6 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
|
||||
cmd_height = tui_term_height () / 3;
|
||||
src_height = tui_term_height () - cmd_height;
|
||||
|
||||
|
||||
if (layout_type == SRC_COMMAND)
|
||||
win_info_ptr = &TUI_SRC_WIN;
|
||||
else
|
||||
@ -1009,25 +1022,24 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
|
||||
else
|
||||
{
|
||||
init_gen_win_info (locator,
|
||||
LOCATOR_WIN,
|
||||
2 /* 1 */ ,
|
||||
tui_term_width (),
|
||||
0,
|
||||
src_height - 1);
|
||||
LOCATOR_WIN,
|
||||
2 /* 1 */ ,
|
||||
tui_term_width (),
|
||||
0,
|
||||
src_height - 1);
|
||||
(*win_info_ptr)->detail.source_info.has_locator = TRUE;
|
||||
init_gen_win_info (
|
||||
&(*win_info_ptr)->generic,
|
||||
(*win_info_ptr)->generic.type,
|
||||
src_height - 1,
|
||||
(*win_info_ptr)->generic.width,
|
||||
(*win_info_ptr)->detail.source_info.execution_info->width,
|
||||
0);
|
||||
init_gen_win_info (&(*win_info_ptr)->generic,
|
||||
(*win_info_ptr)->generic.type,
|
||||
src_height - 1,
|
||||
(*win_info_ptr)->generic.width,
|
||||
(*win_info_ptr)->detail.source_info.execution_info->width,
|
||||
0);
|
||||
init_gen_win_info ((*win_info_ptr)->detail.source_info.execution_info,
|
||||
EXEC_INFO_WIN,
|
||||
src_height - 1,
|
||||
3,
|
||||
0,
|
||||
0);
|
||||
EXEC_INFO_WIN,
|
||||
src_height - 1,
|
||||
3,
|
||||
0,
|
||||
0);
|
||||
(*win_info_ptr)->can_highlight = TRUE;
|
||||
tui_make_visible (&(*win_info_ptr)->generic);
|
||||
tui_make_visible ((*win_info_ptr)->detail.source_info.execution_info);
|
||||
@ -1047,11 +1059,11 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
|
||||
else
|
||||
{
|
||||
init_gen_win_info (&TUI_CMD_WIN->generic,
|
||||
TUI_CMD_WIN->generic.type,
|
||||
TUI_CMD_WIN->generic.height,
|
||||
TUI_CMD_WIN->generic.width,
|
||||
TUI_CMD_WIN->generic.origin.x,
|
||||
TUI_CMD_WIN->generic.origin.y);
|
||||
TUI_CMD_WIN->generic.type,
|
||||
TUI_CMD_WIN->generic.height,
|
||||
TUI_CMD_WIN->generic.width,
|
||||
TUI_CMD_WIN->generic.origin.x,
|
||||
TUI_CMD_WIN->generic.origin.y);
|
||||
TUI_CMD_WIN->can_highlight = FALSE;
|
||||
tui_make_visible (&TUI_CMD_WIN->generic);
|
||||
}
|
||||
|
@ -29,7 +29,8 @@
|
||||
#include "tui/tui-data.h"
|
||||
|
||||
extern void tui_add_win_to_layout (enum tui_win_type);
|
||||
extern int tui_default_win_height (enum tui_win_type, enum tui_layout_type);
|
||||
extern int tui_default_win_height (enum tui_win_type,
|
||||
enum tui_layout_type);
|
||||
extern int tui_default_win_viewport_height (enum tui_win_type,
|
||||
enum tui_layout_type);
|
||||
extern enum tui_status tui_set_layout (enum tui_layout_type,
|
||||
|
@ -40,33 +40,46 @@ typedef struct ui_out_data tui_out_data;
|
||||
|
||||
/* These are the CLI output functions. */
|
||||
|
||||
static void tui_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||
int nr_rows, const char *tblid);
|
||||
static void tui_table_begin (struct ui_out *uiout,
|
||||
int nbrofcols, int nr_rows,
|
||||
const char *tblid);
|
||||
static void tui_table_body (struct ui_out *uiout);
|
||||
static void tui_table_end (struct ui_out *uiout);
|
||||
static void tui_table_header (struct ui_out *uiout, int width,
|
||||
enum ui_align alig, const char *col_name,
|
||||
static void tui_table_header (struct ui_out *uiout,
|
||||
int width, enum ui_align alig,
|
||||
const char *col_name,
|
||||
const char *colhdr);
|
||||
static void tui_begin (struct ui_out *uiout, enum ui_out_type type,
|
||||
static void tui_begin (struct ui_out *uiout,
|
||||
enum ui_out_type type,
|
||||
int level, const char *lstid);
|
||||
static void tui_end (struct ui_out *uiout, enum ui_out_type type, int level);
|
||||
static void tui_field_int (struct ui_out *uiout, int fldno, int width,
|
||||
enum ui_align alig, const char *fldname, int value);
|
||||
static void tui_field_skip (struct ui_out *uiout, int fldno, int width,
|
||||
enum ui_align alig, const char *fldname);
|
||||
static void tui_field_string (struct ui_out *uiout, int fldno, int width,
|
||||
enum ui_align alig, const char *fldname,
|
||||
static void tui_end (struct ui_out *uiout,
|
||||
enum ui_out_type type, int level);
|
||||
static void tui_field_int (struct ui_out *uiout,
|
||||
int fldno, int width,
|
||||
enum ui_align alig,
|
||||
const char *fldname, int value);
|
||||
static void tui_field_skip (struct ui_out *uiout,
|
||||
int fldno, int width,
|
||||
enum ui_align alig,
|
||||
const char *fldname);
|
||||
static void tui_field_string (struct ui_out *uiout,
|
||||
int fldno, int width,
|
||||
enum ui_align alig,
|
||||
const char *fldname,
|
||||
const char *string);
|
||||
static void tui_field_fmt (struct ui_out *uiout, int fldno,
|
||||
int width, enum ui_align align,
|
||||
const char *fldname, const char *format,
|
||||
va_list args) ATTR_FORMAT (printf, 6, 0);
|
||||
const char *fldname,
|
||||
const char *format,
|
||||
va_list args)
|
||||
ATTR_FORMAT (printf, 6, 0);
|
||||
static void tui_spaces (struct ui_out *uiout, int numspaces);
|
||||
static void tui_text (struct ui_out *uiout, const char *string);
|
||||
static void tui_message (struct ui_out *uiout, int verbosity,
|
||||
const char *format, va_list args)
|
||||
ATTR_FORMAT (printf, 3, 0);
|
||||
static void tui_wrap_hint (struct ui_out *uiout, char *identstring);
|
||||
static void tui_wrap_hint (struct ui_out *uiout,
|
||||
char *identstring);
|
||||
static void tui_flush (struct ui_out *uiout);
|
||||
|
||||
/* This is the CLI ui-out implementation functions vector. */
|
||||
@ -74,8 +87,7 @@ static void tui_flush (struct ui_out *uiout);
|
||||
/* FIXME: This can be initialized dynamically after default is set to
|
||||
handle initial output in main.c. */
|
||||
|
||||
static struct ui_out_impl tui_ui_out_impl =
|
||||
{
|
||||
static struct ui_out_impl tui_ui_out_impl = {
|
||||
tui_table_begin,
|
||||
tui_table_body,
|
||||
tui_table_end,
|
||||
@ -101,9 +113,11 @@ extern void _initialize_tui_out (void);
|
||||
|
||||
static void field_separator (void);
|
||||
|
||||
static void out_field_fmt (struct ui_out *uiout, int fldno,
|
||||
static void out_field_fmt (struct ui_out *uiout,
|
||||
int fldno,
|
||||
const char *fldname,
|
||||
const char *format,...) ATTR_FORMAT (printf, 4, 5);
|
||||
const char *format,...)
|
||||
ATTR_FORMAT (printf, 4, 5);
|
||||
|
||||
/* local variables */
|
||||
|
||||
@ -112,7 +126,8 @@ static void out_field_fmt (struct ui_out *uiout, int fldno,
|
||||
/* Mark beginning of a table. */
|
||||
|
||||
void
|
||||
tui_table_begin (struct ui_out *uiout, int nbrofcols,
|
||||
tui_table_begin (struct ui_out *uiout,
|
||||
int nbrofcols,
|
||||
int nr_rows,
|
||||
const char *tblid)
|
||||
{
|
||||
@ -149,7 +164,9 @@ tui_table_end (struct ui_out *uiout)
|
||||
/* Specify table header. */
|
||||
|
||||
void
|
||||
tui_table_header (struct ui_out *uiout, int width, enum ui_align alignment,
|
||||
tui_table_header (struct ui_out *uiout,
|
||||
int width,
|
||||
enum ui_align alignment,
|
||||
const char *col_name,
|
||||
const char *colhdr)
|
||||
{
|
||||
@ -187,9 +204,11 @@ tui_end (struct ui_out *uiout,
|
||||
/* Output an int field. */
|
||||
|
||||
void
|
||||
tui_field_int (struct ui_out *uiout, int fldno, int width,
|
||||
tui_field_int (struct ui_out *uiout,
|
||||
int fldno, int width,
|
||||
enum ui_align alignment,
|
||||
const char *fldname, int value)
|
||||
const char *fldname,
|
||||
int value)
|
||||
{
|
||||
char buffer[20]; /* FIXME: how many chars long a %d can become? */
|
||||
|
||||
@ -212,7 +231,8 @@ tui_field_int (struct ui_out *uiout, int fldno, int width,
|
||||
/* Used to ommit a field. */
|
||||
|
||||
void
|
||||
tui_field_skip (struct ui_out *uiout, int fldno, int width,
|
||||
tui_field_skip (struct ui_out *uiout,
|
||||
int fldno, int width,
|
||||
enum ui_align alignment,
|
||||
const char *fldname)
|
||||
{
|
||||
@ -227,8 +247,7 @@ tui_field_skip (struct ui_out *uiout, int fldno, int width,
|
||||
|
||||
void
|
||||
tui_field_string (struct ui_out *uiout,
|
||||
int fldno,
|
||||
int width,
|
||||
int fldno, int width,
|
||||
enum ui_align align,
|
||||
const char *fldname,
|
||||
const char *string)
|
||||
@ -336,8 +355,10 @@ tui_text (struct ui_out *uiout, const char *string)
|
||||
}
|
||||
|
||||
void
|
||||
tui_message (struct ui_out *uiout, int verbosity,
|
||||
const char *format, va_list args)
|
||||
tui_message (struct ui_out *uiout,
|
||||
int verbosity,
|
||||
const char *format,
|
||||
va_list args)
|
||||
{
|
||||
tui_out_data *data = ui_out_data (uiout);
|
||||
if (data->suppress_output)
|
||||
@ -369,7 +390,8 @@ tui_flush (struct ui_out *uiout)
|
||||
|
||||
/* VARARGS */
|
||||
static void
|
||||
out_field_fmt (struct ui_out *uiout, int fldno,
|
||||
out_field_fmt (struct ui_out *uiout,
|
||||
int fldno,
|
||||
const char *fldname,
|
||||
const char *format,...)
|
||||
{
|
||||
|
@ -51,14 +51,20 @@ tui_display_register (struct tui_data_element *data,
|
||||
struct tui_gen_win_info *win_info);
|
||||
|
||||
static enum tui_status
|
||||
tui_show_register_group (struct gdbarch *gdbarch, struct reggroup *group,
|
||||
struct frame_info *frame, int refresh_values_only);
|
||||
tui_show_register_group (struct gdbarch *gdbarch,
|
||||
struct reggroup *group,
|
||||
struct frame_info *frame,
|
||||
int refresh_values_only);
|
||||
|
||||
static enum tui_status
|
||||
tui_get_register (struct gdbarch *gdbarch, struct frame_info *frame,
|
||||
struct tui_data_element *data, int regnum, int *changedp);
|
||||
static void tui_register_format
|
||||
(struct gdbarch *, struct frame_info *, struct tui_data_element*, int);
|
||||
tui_get_register (struct gdbarch *gdbarch,
|
||||
struct frame_info *frame,
|
||||
struct tui_data_element *data,
|
||||
int regnum, int *changedp);
|
||||
static void tui_register_format (struct gdbarch *,
|
||||
struct frame_info *,
|
||||
struct tui_data_element*,
|
||||
int);
|
||||
static void tui_scroll_regs_forward_command (char *, int);
|
||||
static void tui_scroll_regs_backward_command (char *, int);
|
||||
|
||||
@ -203,8 +209,10 @@ tui_show_registers (struct reggroup *group)
|
||||
refresh_values_only is TRUE. */
|
||||
|
||||
static enum tui_status
|
||||
tui_show_register_group (struct gdbarch *gdbarch, struct reggroup *group,
|
||||
struct frame_info *frame, int refresh_values_only)
|
||||
tui_show_register_group (struct gdbarch *gdbarch,
|
||||
struct reggroup *group,
|
||||
struct frame_info *frame,
|
||||
int refresh_values_only)
|
||||
{
|
||||
enum tui_status ret = TUI_FAILURE;
|
||||
int nr_regs;
|
||||
@ -409,7 +417,8 @@ tui_display_registers_from (int start_element_no)
|
||||
content or the end of the display height. This function checks
|
||||
that we won't display off the end of the register display. */
|
||||
void
|
||||
tui_display_reg_element_at_line (int start_element_no, int start_line_no)
|
||||
tui_display_reg_element_at_line (int start_element_no,
|
||||
int start_line_no)
|
||||
{
|
||||
if (TUI_DATA_WIN->detail.data_display_info.regs_content != (tui_win_content) NULL &&
|
||||
TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0)
|
||||
@ -443,7 +452,8 @@ tui_display_reg_element_at_line (int start_element_no, int start_line_no)
|
||||
data window. Answers the line number that the display actually
|
||||
started from. If nothing is displayed (-1) is returned. */
|
||||
int
|
||||
tui_display_registers_from_line (int line_no, int force_display)
|
||||
tui_display_registers_from_line (int line_no,
|
||||
int force_display)
|
||||
{
|
||||
if (TUI_DATA_WIN->detail.data_display_info.regs_content_count > 0)
|
||||
{
|
||||
@ -650,8 +660,10 @@ tui_restore_gdbout (void *ui)
|
||||
/* Get the register from the frame and make a printable representation
|
||||
of it in the data element. */
|
||||
static void
|
||||
tui_register_format (struct gdbarch *gdbarch, struct frame_info *frame,
|
||||
struct tui_data_element *data_element, int regnum)
|
||||
tui_register_format (struct gdbarch *gdbarch,
|
||||
struct frame_info *frame,
|
||||
struct tui_data_element *data_element,
|
||||
int regnum)
|
||||
{
|
||||
struct ui_file *stream;
|
||||
struct ui_file *old_stdout;
|
||||
@ -705,8 +717,10 @@ tui_register_format (struct gdbarch *gdbarch, struct frame_info *frame,
|
||||
display. When changep is set, check if the new register value has
|
||||
changed with respect to the previous call. */
|
||||
static enum tui_status
|
||||
tui_get_register (struct gdbarch *gdbarch, struct frame_info *frame,
|
||||
struct tui_data_element *data, int regnum, int *changedp)
|
||||
tui_get_register (struct gdbarch *gdbarch,
|
||||
struct frame_info *frame,
|
||||
struct tui_data_element *data,
|
||||
int regnum, int *changedp)
|
||||
{
|
||||
enum tui_status ret = TUI_FAILURE;
|
||||
|
||||
|
@ -41,7 +41,9 @@
|
||||
|
||||
/* Function to display source in the source window. */
|
||||
enum tui_status
|
||||
tui_set_source_content (struct symtab *s, int line_no, int noerror)
|
||||
tui_set_source_content (struct symtab *s,
|
||||
int line_no,
|
||||
int noerror)
|
||||
{
|
||||
enum tui_status ret = TUI_FAILURE;
|
||||
|
||||
@ -240,7 +242,8 @@ tui_set_source_content (struct symtab *s, int line_no, int noerror)
|
||||
source files cannot be accessed. */
|
||||
|
||||
void
|
||||
tui_set_source_content_nil (struct tui_win_info *win_info, char *warning_string)
|
||||
tui_set_source_content_nil (struct tui_win_info *win_info,
|
||||
char *warning_string)
|
||||
{
|
||||
int line_width;
|
||||
int n_lines;
|
||||
@ -309,7 +312,9 @@ tui_set_source_content_nil (struct tui_win_info *win_info, char *warning_string)
|
||||
/* Function to display source in the source window. This function
|
||||
initializes the horizontal scroll to 0. */
|
||||
void
|
||||
tui_show_symtab_source (struct symtab *s, struct tui_line_or_address line, int noerror)
|
||||
tui_show_symtab_source (struct symtab *s,
|
||||
struct tui_line_or_address line,
|
||||
int noerror)
|
||||
{
|
||||
TUI_SRC_WIN->detail.source_info.horizontal_offset = 0;
|
||||
tui_update_source_window_as_is (TUI_SRC_WIN, s, line, noerror);
|
||||
|
@ -30,11 +30,16 @@
|
||||
struct symtab;
|
||||
struct tui_win_info;
|
||||
|
||||
extern void tui_set_source_content_nil (struct tui_win_info *, char *);
|
||||
extern void tui_set_source_content_nil (struct tui_win_info *,
|
||||
char *);
|
||||
|
||||
extern enum tui_status tui_set_source_content (struct symtab *, int, int);
|
||||
extern void tui_show_symtab_source (struct symtab *, struct tui_line_or_address, int);
|
||||
extern enum tui_status tui_set_source_content (struct symtab *,
|
||||
int, int);
|
||||
extern void tui_show_symtab_source (struct symtab *,
|
||||
struct tui_line_or_address,
|
||||
int);
|
||||
extern int tui_source_is_displayed (char *);
|
||||
extern void tui_vertical_source_scroll (enum tui_scroll_direction, int);
|
||||
extern void tui_vertical_source_scroll (enum tui_scroll_direction,
|
||||
int);
|
||||
|
||||
#endif
|
||||
|
@ -50,7 +50,8 @@ static char *tui_get_function_from_frame (struct frame_info *fi);
|
||||
static void tui_set_locator_filename (const char *filename);
|
||||
|
||||
/* Update the locator, with the provided arguments. */
|
||||
static void tui_set_locator_info (const char *filename, const char *procname,
|
||||
static void tui_set_locator_info (const char *filename,
|
||||
const char *procname,
|
||||
int lineno, CORE_ADDR addr);
|
||||
|
||||
static void tui_update_command (char *, int);
|
||||
@ -286,7 +287,9 @@ tui_set_locator_filename (const char *filename)
|
||||
|
||||
/* Update the locator, with the provided arguments. */
|
||||
static void
|
||||
tui_set_locator_info (const char *filename, const char *procname, int lineno,
|
||||
tui_set_locator_info (const char *filename,
|
||||
const char *procname,
|
||||
int lineno,
|
||||
CORE_ADDR addr)
|
||||
{
|
||||
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||
|
@ -56,8 +56,10 @@
|
||||
** Static Local Decls
|
||||
********************************/
|
||||
static void make_visible_with_new_height (struct tui_win_info *);
|
||||
static void make_invisible_and_set_new_height (struct tui_win_info *, int);
|
||||
static enum tui_status tui_adjust_win_heights (struct tui_win_info *, int);
|
||||
static void make_invisible_and_set_new_height (struct tui_win_info *,
|
||||
int);
|
||||
static enum tui_status tui_adjust_win_heights (struct tui_win_info *,
|
||||
int);
|
||||
static int new_height_ok (struct tui_win_info *, int);
|
||||
static void tui_set_tab_width_command (char *, int);
|
||||
static void tui_refresh_all_command (char *, int);
|
||||
@ -69,15 +71,17 @@ static void tui_scroll_forward_command (char *, int);
|
||||
static void tui_scroll_backward_command (char *, int);
|
||||
static void tui_scroll_left_command (char *, int);
|
||||
static void tui_scroll_right_command (char *, int);
|
||||
static void parse_scrolling_args (char *, struct tui_win_info **, int *);
|
||||
static void parse_scrolling_args (char *,
|
||||
struct tui_win_info **,
|
||||
int *);
|
||||
|
||||
|
||||
/***************************************
|
||||
** DEFINITIONS
|
||||
***************************************/
|
||||
#define WIN_HEIGHT_USAGE "Usage: winheight <win_name> [+ | -] <#lines>\n"
|
||||
#define XDBWIN_HEIGHT_USAGE "Usage: w <#lines>\n"
|
||||
#define FOCUS_USAGE "Usage: focus {<win> | next | prev}\n"
|
||||
#define WIN_HEIGHT_USAGE "Usage: winheight <win_name> [+ | -] <#lines>\n"
|
||||
#define XDBWIN_HEIGHT_USAGE "Usage: w <#lines>\n"
|
||||
#define FOCUS_USAGE "Usage: focus {<win> | next | prev}\n"
|
||||
|
||||
/***************************************
|
||||
** PUBLIC FUNCTIONS
|
||||
@ -199,8 +203,10 @@ struct tui_translate tui_border_kind_translate_lrcorner[] = {
|
||||
/* Tui configuration variables controlled with set/show command. */
|
||||
const char *tui_active_border_mode = "bold-standout";
|
||||
static void
|
||||
show_tui_active_border_mode (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
show_tui_active_border_mode (struct ui_file *file,
|
||||
int from_tty,
|
||||
struct cmd_list_element *c,
|
||||
const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
The attribute mode to use for the active TUI window border is \"%s\".\n"),
|
||||
@ -209,8 +215,10 @@ The attribute mode to use for the active TUI window border is \"%s\".\n"),
|
||||
|
||||
const char *tui_border_mode = "normal";
|
||||
static void
|
||||
show_tui_border_mode (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
show_tui_border_mode (struct ui_file *file,
|
||||
int from_tty,
|
||||
struct cmd_list_element *c,
|
||||
const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
The attribute mode to use for the TUI window borders is \"%s\".\n"),
|
||||
@ -219,8 +227,10 @@ The attribute mode to use for the TUI window borders is \"%s\".\n"),
|
||||
|
||||
const char *tui_border_kind = "acs";
|
||||
static void
|
||||
show_tui_border_kind (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
show_tui_border_kind (struct ui_file *file,
|
||||
int from_tty,
|
||||
struct cmd_list_element *c,
|
||||
const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("The kind of border for TUI windows is \"%s\".\n"),
|
||||
value);
|
||||
@ -336,7 +346,8 @@ tui_get_cmd_list (void)
|
||||
return &tuilist;
|
||||
}
|
||||
|
||||
/* Function to initialize gdb commands, for tui window manipulation. */
|
||||
/* Function to initialize gdb commands, for tui window
|
||||
manipulation. */
|
||||
void
|
||||
_initialize_tui_win (void)
|
||||
{
|
||||
@ -480,7 +491,8 @@ tui_set_win_focus_to (struct tui_win_info *win_info)
|
||||
|
||||
|
||||
void
|
||||
tui_scroll_forward (struct tui_win_info *win_to_scroll, int num_to_scroll)
|
||||
tui_scroll_forward (struct tui_win_info *win_to_scroll,
|
||||
int num_to_scroll)
|
||||
{
|
||||
if (win_to_scroll != TUI_CMD_WIN)
|
||||
{
|
||||
@ -504,7 +516,8 @@ tui_scroll_forward (struct tui_win_info *win_to_scroll, int num_to_scroll)
|
||||
}
|
||||
|
||||
void
|
||||
tui_scroll_backward (struct tui_win_info *win_to_scroll, int num_to_scroll)
|
||||
tui_scroll_backward (struct tui_win_info *win_to_scroll,
|
||||
int num_to_scroll)
|
||||
{
|
||||
if (win_to_scroll != TUI_CMD_WIN)
|
||||
{
|
||||
@ -529,7 +542,8 @@ tui_scroll_backward (struct tui_win_info *win_to_scroll, int num_to_scroll)
|
||||
|
||||
|
||||
void
|
||||
tui_scroll_left (struct tui_win_info *win_to_scroll, int num_to_scroll)
|
||||
tui_scroll_left (struct tui_win_info *win_to_scroll,
|
||||
int num_to_scroll)
|
||||
{
|
||||
if (win_to_scroll != TUI_CMD_WIN)
|
||||
{
|
||||
@ -549,7 +563,8 @@ tui_scroll_left (struct tui_win_info *win_to_scroll, int num_to_scroll)
|
||||
|
||||
|
||||
void
|
||||
tui_scroll_right (struct tui_win_info *win_to_scroll, int num_to_scroll)
|
||||
tui_scroll_right (struct tui_win_info *win_to_scroll,
|
||||
int num_to_scroll)
|
||||
{
|
||||
if (win_to_scroll != TUI_CMD_WIN)
|
||||
{
|
||||
@ -1090,7 +1105,8 @@ tui_xdb_set_win_height_command (char *arg, int from_tty)
|
||||
|
||||
/* Function to adjust all window heights around the primary. */
|
||||
static enum tui_status
|
||||
tui_adjust_win_heights (struct tui_win_info *primary_win_info, int new_height)
|
||||
tui_adjust_win_heights (struct tui_win_info *primary_win_info,
|
||||
int new_height)
|
||||
{
|
||||
enum tui_status status = TUI_FAILURE;
|
||||
|
||||
@ -1242,7 +1258,8 @@ tui_adjust_win_heights (struct tui_win_info *primary_win_info, int new_height)
|
||||
with the targer) invisible, and set the new height and
|
||||
location. */
|
||||
static void
|
||||
make_invisible_and_set_new_height (struct tui_win_info *win_info, int height)
|
||||
make_invisible_and_set_new_height (struct tui_win_info *win_info,
|
||||
int height)
|
||||
{
|
||||
int i;
|
||||
struct tui_gen_win_info *gen_win_info;
|
||||
@ -1363,7 +1380,8 @@ make_visible_with_new_height (struct tui_win_info *win_info)
|
||||
|
||||
|
||||
static int
|
||||
new_height_ok (struct tui_win_info *primary_win_info, int new_height)
|
||||
new_height_ok (struct tui_win_info *primary_win_info,
|
||||
int new_height)
|
||||
{
|
||||
int ok = (new_height < tui_term_height ());
|
||||
|
||||
@ -1470,7 +1488,8 @@ new_height_ok (struct tui_win_info *primary_win_info, int new_height)
|
||||
|
||||
|
||||
static void
|
||||
parse_scrolling_args (char *arg, struct tui_win_info **win_to_scroll,
|
||||
parse_scrolling_args (char *arg,
|
||||
struct tui_win_info **win_to_scroll,
|
||||
int *num_to_scroll)
|
||||
{
|
||||
if (num_to_scroll)
|
||||
|
@ -33,7 +33,8 @@ extern void tui_scroll_forward (struct tui_win_info *, int);
|
||||
extern void tui_scroll_backward (struct tui_win_info *, int);
|
||||
extern void tui_scroll_left (struct tui_win_info *, int);
|
||||
extern void tui_scroll_right (struct tui_win_info *, int);
|
||||
extern void tui_scroll (enum tui_scroll_direction, struct tui_win_info *, int);
|
||||
extern void tui_scroll (enum tui_scroll_direction,
|
||||
struct tui_win_info *, int);
|
||||
extern void tui_set_win_focus_to (struct tui_win_info *);
|
||||
extern void tui_resize_all (void);
|
||||
extern void tui_refresh_all_win (void);
|
||||
|
@ -56,7 +56,7 @@ tui_first_data_item_displayed (void)
|
||||
struct tui_gen_win_info *data_item_win;
|
||||
|
||||
data_item_win = &((tui_win_content)
|
||||
TUI_DATA_WIN->generic.content)[i]->which_element.data_window;
|
||||
TUI_DATA_WIN->generic.content)[i]->which_element.data_window;
|
||||
if (data_item_win->handle != (WINDOW *) NULL && data_item_win->is_visible)
|
||||
element_no = i;
|
||||
}
|
||||
@ -93,7 +93,7 @@ tui_delete_data_content_windows (void)
|
||||
for (i = 0; (i < TUI_DATA_WIN->generic.content_size); i++)
|
||||
{
|
||||
data_item_win_ptr = &((tui_win_content)
|
||||
TUI_DATA_WIN->generic.content)[i]->which_element.data_window;
|
||||
TUI_DATA_WIN->generic.content)[i]->which_element.data_window;
|
||||
tui_delete_win (data_item_win_ptr->handle);
|
||||
data_item_win_ptr->handle = (WINDOW *) NULL;
|
||||
data_item_win_ptr->is_visible = FALSE;
|
||||
@ -263,7 +263,8 @@ tui_check_data_values (struct frame_info *frame)
|
||||
|
||||
/* Scroll the data window vertically forward or backward. */
|
||||
void
|
||||
tui_vertical_data_scroll (enum tui_scroll_direction scroll_direction, int num_to_scroll)
|
||||
tui_vertical_data_scroll (enum tui_scroll_direction scroll_direction,
|
||||
int num_to_scroll)
|
||||
{
|
||||
int first_element_no;
|
||||
int first_line = (-1);
|
||||
|
@ -36,6 +36,7 @@ extern int tui_first_data_element_no_in_line (int);
|
||||
extern void tui_delete_data_content_windows (void);
|
||||
extern void tui_refresh_data_win (void);
|
||||
extern void tui_display_data_from (int, int);
|
||||
extern void tui_vertical_data_scroll (enum tui_scroll_direction, int);
|
||||
extern void tui_vertical_data_scroll (enum tui_scroll_direction,
|
||||
int);
|
||||
|
||||
#endif
|
||||
|
@ -47,7 +47,7 @@ tui_refresh_win (struct tui_gen_win_info *win_info)
|
||||
struct tui_gen_win_info *data_item_win_ptr;
|
||||
|
||||
data_item_win_ptr = &((tui_win_content)
|
||||
win_info->content)[i]->which_element.data_window;
|
||||
win_info->content)[i]->which_element.data_window;
|
||||
if (data_item_win_ptr != NULL
|
||||
&& data_item_win_ptr->handle != (WINDOW *) NULL)
|
||||
wrefresh (data_item_win_ptr->handle);
|
||||
@ -80,7 +80,8 @@ tui_delete_win (WINDOW *window)
|
||||
|
||||
/* Draw a border arround the window. */
|
||||
void
|
||||
box_win (struct tui_gen_win_info *win_info, int highlight_flag)
|
||||
box_win (struct tui_gen_win_info *win_info,
|
||||
int highlight_flag)
|
||||
{
|
||||
if (win_info && win_info->handle)
|
||||
{
|
||||
|
@ -71,8 +71,10 @@ tui_display_main (void)
|
||||
/* Function to display source in the source window. This function
|
||||
initializes the horizontal scroll to 0. */
|
||||
void
|
||||
tui_update_source_window (struct tui_win_info *win_info, struct symtab *s,
|
||||
struct tui_line_or_address line_or_addr, int noerror)
|
||||
tui_update_source_window (struct tui_win_info *win_info,
|
||||
struct symtab *s,
|
||||
struct tui_line_or_address line_or_addr,
|
||||
int noerror)
|
||||
{
|
||||
win_info->detail.source_info.horizontal_offset = 0;
|
||||
tui_update_source_window_as_is (win_info, s, line_or_addr, noerror);
|
||||
@ -84,8 +86,10 @@ tui_update_source_window (struct tui_win_info *win_info, struct symtab *s,
|
||||
/* Function to display source in the source/asm window. This function
|
||||
shows the source as specified by the horizontal offset. */
|
||||
void
|
||||
tui_update_source_window_as_is (struct tui_win_info *win_info, struct symtab *s,
|
||||
struct tui_line_or_address line_or_addr, int noerror)
|
||||
tui_update_source_window_as_is (struct tui_win_info *win_info,
|
||||
struct symtab *s,
|
||||
struct tui_line_or_address line_or_addr,
|
||||
int noerror)
|
||||
{
|
||||
enum tui_status ret;
|
||||
|
||||
@ -197,7 +201,8 @@ tui_update_source_windows_with_line (struct symtab *s, int line)
|
||||
}
|
||||
|
||||
void
|
||||
tui_clear_source_content (struct tui_win_info *win_info, int display_prompt)
|
||||
tui_clear_source_content (struct tui_win_info *win_info,
|
||||
int display_prompt)
|
||||
{
|
||||
if (win_info != NULL)
|
||||
{
|
||||
@ -217,7 +222,8 @@ tui_clear_source_content (struct tui_win_info *win_info, int display_prompt)
|
||||
|
||||
|
||||
void
|
||||
tui_erase_source_content (struct tui_win_info *win_info, int display_prompt)
|
||||
tui_erase_source_content (struct tui_win_info *win_info,
|
||||
int display_prompt)
|
||||
{
|
||||
int x_pos;
|
||||
int half_width = (win_info->generic.width - 2) / 2;
|
||||
@ -339,7 +345,8 @@ tui_horizontal_source_scroll (struct tui_win_info *win_info,
|
||||
line_no. */
|
||||
|
||||
void
|
||||
tui_set_is_exec_point_at (struct tui_line_or_address l, struct tui_win_info *win_info)
|
||||
tui_set_is_exec_point_at (struct tui_line_or_address l,
|
||||
struct tui_win_info *win_info)
|
||||
{
|
||||
int changed = 0;
|
||||
int i;
|
||||
@ -401,7 +408,8 @@ tui_update_all_breakpoint_info (void)
|
||||
refreshed. */
|
||||
|
||||
int
|
||||
tui_update_breakpoint_info (struct tui_win_info *win, int current_only)
|
||||
tui_update_breakpoint_info (struct tui_win_info *win,
|
||||
int current_only)
|
||||
{
|
||||
int i;
|
||||
int need_refresh = 0;
|
||||
@ -611,7 +619,8 @@ tui_alloc_source_buffer (struct tui_win_info *win_info)
|
||||
/* Answer whether the a particular line number or address is displayed
|
||||
in the current source window. */
|
||||
int
|
||||
tui_line_is_displayed (int line, struct tui_win_info *win_info,
|
||||
tui_line_is_displayed (int line,
|
||||
struct tui_win_info *win_info,
|
||||
int check_threshold)
|
||||
{
|
||||
int is_displayed = FALSE;
|
||||
@ -640,8 +649,9 @@ tui_line_is_displayed (int line, struct tui_win_info *win_info,
|
||||
/* Answer whether the a particular line number or address is displayed
|
||||
in the current source window. */
|
||||
int
|
||||
tui_addr_is_displayed (CORE_ADDR addr, struct tui_win_info *win_info,
|
||||
int check_threshold)
|
||||
tui_addr_is_displayed (CORE_ADDR addr,
|
||||
struct tui_win_info *win_info,
|
||||
int check_threshold)
|
||||
{
|
||||
int is_displayed = FALSE;
|
||||
int i, threshold;
|
||||
|
@ -42,29 +42,38 @@ extern int tui_update_breakpoint_info (struct tui_win_info *win,
|
||||
|
||||
/* Function to display the "main" routine. */
|
||||
extern void tui_display_main (void);
|
||||
extern void tui_update_source_window (struct tui_win_info *, struct symtab *,
|
||||
struct tui_line_or_address, int);
|
||||
extern void tui_update_source_window (struct tui_win_info *,
|
||||
struct symtab *,
|
||||
struct tui_line_or_address,
|
||||
int);
|
||||
extern void tui_update_source_window_as_is (struct tui_win_info *,
|
||||
struct symtab *,
|
||||
struct tui_line_or_address, int);
|
||||
struct tui_line_or_address,
|
||||
int);
|
||||
extern void tui_update_source_windows_with_addr (CORE_ADDR);
|
||||
extern void tui_update_source_windows_with_line (struct symtab *, int);
|
||||
extern void tui_update_source_windows_with_line (struct symtab *,
|
||||
int);
|
||||
extern void tui_clear_source_content (struct tui_win_info *, int);
|
||||
extern void tui_erase_source_content (struct tui_win_info *, int);
|
||||
extern void tui_show_source_content (struct tui_win_info *);
|
||||
extern void tui_horizontal_source_scroll (struct tui_win_info *,
|
||||
enum tui_scroll_direction, int);
|
||||
enum tui_scroll_direction,
|
||||
int);
|
||||
extern enum tui_status tui_set_exec_info_content (struct tui_win_info *);
|
||||
extern void tui_show_exec_info_content (struct tui_win_info *);
|
||||
extern void tui_erase_exec_info_content (struct tui_win_info *);
|
||||
extern void tui_clear_exec_info_content (struct tui_win_info *);
|
||||
extern void tui_update_exec_info (struct tui_win_info *);
|
||||
|
||||
extern void tui_set_is_exec_point_at (struct tui_line_or_address,
|
||||
extern void tui_set_is_exec_point_at (struct tui_line_or_address,
|
||||
struct tui_win_info *);
|
||||
extern enum tui_status tui_alloc_source_buffer (struct tui_win_info *);
|
||||
extern int tui_line_is_displayed (int, struct tui_win_info *, int);
|
||||
extern int tui_addr_is_displayed (CORE_ADDR, struct tui_win_info *, int);
|
||||
extern int tui_line_is_displayed (int,
|
||||
struct tui_win_info *,
|
||||
int);
|
||||
extern int tui_addr_is_displayed (CORE_ADDR,
|
||||
struct tui_win_info *,
|
||||
int);
|
||||
|
||||
|
||||
/* Constant definitions. */
|
||||
|
@ -458,7 +458,8 @@ tui_disable (void)
|
||||
}
|
||||
|
||||
void
|
||||
strcat_to_buf (char *buf, int buflen, const char *item_to_add)
|
||||
strcat_to_buf (char *buf, int buflen,
|
||||
const char *item_to_add)
|
||||
{
|
||||
if (item_to_add != (char *) NULL && buf != (char *) NULL)
|
||||
{
|
||||
@ -555,7 +556,8 @@ tui_is_window_visible (enum tui_win_type type)
|
||||
}
|
||||
|
||||
int
|
||||
tui_get_command_dimension (unsigned int *width, unsigned int *height)
|
||||
tui_get_command_dimension (unsigned int *width,
|
||||
unsigned int *height)
|
||||
{
|
||||
if (!tui_active || (TUI_CMD_WIN == NULL))
|
||||
{
|
||||
|
@ -56,7 +56,8 @@ enum tui_win_type
|
||||
|
||||
/* GENERAL TUI FUNCTIONS */
|
||||
/* tui.c */
|
||||
extern CORE_ADDR tui_get_low_disassembly_address (CORE_ADDR, CORE_ADDR);
|
||||
extern CORE_ADDR tui_get_low_disassembly_address (CORE_ADDR,
|
||||
CORE_ADDR);
|
||||
extern void tui_show_assembly (CORE_ADDR addr);
|
||||
extern int tui_is_window_visible (enum tui_win_type type);
|
||||
extern int tui_get_command_dimension (unsigned int *width,
|
||||
@ -98,6 +99,6 @@ extern void tui_show_source (const char *file, int line);
|
||||
extern struct ui_out *tui_out_new (struct ui_file *stream);
|
||||
|
||||
/* tui-layout.c */
|
||||
extern enum tui_status tui_set_layout_for_display_command (const char *name);
|
||||
extern enum tui_status tui_set_layout_for_display_command (const char *);
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user