mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-29 21:04:22 +08:00
2007-08-14 Michael Snyder <msnyder@access-company.com>
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c, tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c, tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c, tui-winsource.h: Whitespace changes, fix pointer declarations to be consistant.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2007-08-14 Michael Snyder <msnyder@access-company.com>
|
||||||
|
|
||||||
|
* tui-data.c, tui-data.h, tui-disasm.c, tui-hooks.c, tui-layout.c,
|
||||||
|
tui-regs.c, tui-source.c, tui-stack.c, tui-win.c, tui-windata.c,
|
||||||
|
tui-wingeneral.c, tui-wingeneral.h, tui-winsource.c, tui.c,
|
||||||
|
tui-winsource.h: Whitespace changes, fix pointer declarations
|
||||||
|
to be consistant.
|
||||||
|
|
||||||
2007-08-14 Joel Brobecker <brobecker@adacore.com>
|
2007-08-14 Joel Brobecker <brobecker@adacore.com>
|
||||||
Michael Snyder <msnyder@access-company.com>
|
Michael Snyder <msnyder@access-company.com>
|
||||||
|
|
||||||
|
@ -43,10 +43,10 @@ static enum tui_layout_type current_layout = UNDEFINED_LAYOUT;
|
|||||||
static int term_height, term_width;
|
static int term_height, term_width;
|
||||||
static struct tui_gen_win_info _locator;
|
static struct tui_gen_win_info _locator;
|
||||||
static struct tui_gen_win_info exec_info[2];
|
static struct tui_gen_win_info exec_info[2];
|
||||||
static struct tui_win_info * src_win_list[2];
|
static struct tui_win_info *src_win_list[2];
|
||||||
static struct tui_list source_windows = {src_win_list, 0};
|
static struct tui_list source_windows = {src_win_list, 0};
|
||||||
static int default_tab_len = DEFAULT_TAB_LEN;
|
static int default_tab_len = DEFAULT_TAB_LEN;
|
||||||
static struct tui_win_info * win_with_focus = (struct tui_win_info *) NULL;
|
static struct tui_win_info *win_with_focus = (struct tui_win_info *) NULL;
|
||||||
static struct tui_layout_def layout_def =
|
static struct tui_layout_def layout_def =
|
||||||
{SRC_WIN, /* DISPLAY_MODE */
|
{SRC_WIN, /* DISPLAY_MODE */
|
||||||
FALSE, /* SPLIT */
|
FALSE, /* SPLIT */
|
||||||
@ -131,7 +131,7 @@ tui_win_with_focus (void)
|
|||||||
|
|
||||||
/* Set the window that has the logical focus. */
|
/* Set the window that has the logical focus. */
|
||||||
void
|
void
|
||||||
tui_set_win_with_focus (struct tui_win_info * win_info)
|
tui_set_win_with_focus (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
win_with_focus = win_info;
|
win_with_focus = win_info;
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ tui_clear_source_windows_detail (void)
|
|||||||
one source window (either source or disassembly), but both can be
|
one source window (either source or disassembly), but both can be
|
||||||
displayed at the same time. */
|
displayed at the same time. */
|
||||||
void
|
void
|
||||||
tui_add_to_source_windows (struct tui_win_info * win_info)
|
tui_add_to_source_windows (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
if (source_windows.count < 2)
|
if (source_windows.count < 2)
|
||||||
source_windows.list[source_windows.count++] = (void *) win_info;
|
source_windows.list[source_windows.count++] = (void *) win_info;
|
||||||
@ -199,7 +199,7 @@ tui_add_to_source_windows (struct tui_win_info * win_info)
|
|||||||
|
|
||||||
/* Clear the pertinant detail in the windows. */
|
/* Clear the pertinant detail in the windows. */
|
||||||
void
|
void
|
||||||
tui_clear_win_detail (struct tui_win_info * win_info)
|
tui_clear_win_detail (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
if (win_info != NULL)
|
if (win_info != NULL)
|
||||||
{
|
{
|
||||||
@ -309,7 +309,7 @@ tui_set_current_layout_to (enum tui_layout_type new_layout)
|
|||||||
|
|
||||||
/* Set the origin of the window. */
|
/* Set the origin of the window. */
|
||||||
void
|
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.x = x;
|
||||||
win_info->origin.y = y;
|
win_info->origin.y = y;
|
||||||
@ -324,10 +324,10 @@ set_gen_win_origin (struct tui_gen_win_info * win_info, int x, int y)
|
|||||||
/* Answer the next window in the list, cycling back to the top if
|
/* Answer the next window in the list, cycling back to the top if
|
||||||
necessary. */
|
necessary. */
|
||||||
struct tui_win_info *
|
struct tui_win_info *
|
||||||
tui_next_win (struct tui_win_info * cur_win)
|
tui_next_win (struct tui_win_info *cur_win)
|
||||||
{
|
{
|
||||||
enum tui_win_type type = cur_win->generic.type;
|
enum tui_win_type type = cur_win->generic.type;
|
||||||
struct tui_win_info * next_win = (struct tui_win_info *) NULL;
|
struct tui_win_info *next_win = (struct tui_win_info *) NULL;
|
||||||
|
|
||||||
if (cur_win->generic.type == CMD_WIN)
|
if (cur_win->generic.type == CMD_WIN)
|
||||||
type = SRC_WIN;
|
type = SRC_WIN;
|
||||||
@ -353,10 +353,10 @@ tui_next_win (struct tui_win_info * cur_win)
|
|||||||
/* Answer the prev window in the list, cycling back to the bottom if
|
/* Answer the prev window in the list, cycling back to the bottom if
|
||||||
necessary. */
|
necessary. */
|
||||||
struct tui_win_info *
|
struct tui_win_info *
|
||||||
tui_prev_win (struct tui_win_info * cur_win)
|
tui_prev_win (struct tui_win_info *cur_win)
|
||||||
{
|
{
|
||||||
enum tui_win_type type = cur_win->generic.type;
|
enum tui_win_type type = cur_win->generic.type;
|
||||||
struct tui_win_info * prev = (struct tui_win_info *) NULL;
|
struct tui_win_info *prev = (struct tui_win_info *) NULL;
|
||||||
|
|
||||||
if (cur_win->generic.type == SRC_WIN)
|
if (cur_win->generic.type == SRC_WIN)
|
||||||
type = CMD_WIN;
|
type = CMD_WIN;
|
||||||
@ -383,7 +383,7 @@ tui_prev_win (struct tui_win_info * cur_win)
|
|||||||
struct tui_win_info *
|
struct tui_win_info *
|
||||||
tui_partial_win_by_name (char *name)
|
tui_partial_win_by_name (char *name)
|
||||||
{
|
{
|
||||||
struct tui_win_info * win_info = (struct tui_win_info *) NULL;
|
struct tui_win_info *win_info = (struct tui_win_info *) NULL;
|
||||||
|
|
||||||
if (name != (char *) NULL)
|
if (name != (char *) NULL)
|
||||||
{
|
{
|
||||||
@ -408,7 +408,7 @@ tui_partial_win_by_name (char *name)
|
|||||||
|
|
||||||
/* Answer the name of the window. */
|
/* Answer the name of the window. */
|
||||||
char *
|
char *
|
||||||
tui_win_name (struct tui_gen_win_info * win_info)
|
tui_win_name (struct tui_gen_win_info *win_info)
|
||||||
{
|
{
|
||||||
char *name = (char *) NULL;
|
char *name = (char *) NULL;
|
||||||
|
|
||||||
@ -447,7 +447,7 @@ tui_initialize_static_data (void)
|
|||||||
struct tui_gen_win_info *
|
struct tui_gen_win_info *
|
||||||
tui_alloc_generic_win_info (void)
|
tui_alloc_generic_win_info (void)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * win;
|
struct tui_gen_win_info *win;
|
||||||
|
|
||||||
if ((win = XMALLOC (struct tui_gen_win_info)) != NULL)
|
if ((win = XMALLOC (struct tui_gen_win_info)) != NULL)
|
||||||
tui_init_generic_part (win);
|
tui_init_generic_part (win);
|
||||||
@ -457,7 +457,7 @@ tui_alloc_generic_win_info (void)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_init_generic_part (struct tui_gen_win_info * win)
|
tui_init_generic_part (struct tui_gen_win_info *win)
|
||||||
{
|
{
|
||||||
win->width =
|
win->width =
|
||||||
win->height =
|
win->height =
|
||||||
@ -478,7 +478,7 @@ tui_init_generic_part (struct tui_gen_win_info * win)
|
|||||||
** init_content_element().
|
** init_content_element().
|
||||||
*/
|
*/
|
||||||
void
|
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;
|
element->highlight = FALSE;
|
||||||
switch (type)
|
switch (type)
|
||||||
@ -526,7 +526,7 @@ init_content_element (struct tui_win_element * element, enum tui_win_type type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
init_win_info (struct tui_win_info * win_info)
|
init_win_info (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
tui_init_generic_part (&win_info->generic);
|
tui_init_generic_part (&win_info->generic);
|
||||||
win_info->can_highlight =
|
win_info->can_highlight =
|
||||||
@ -567,7 +567,7 @@ init_win_info (struct tui_win_info * win_info)
|
|||||||
struct tui_win_info *
|
struct tui_win_info *
|
||||||
tui_alloc_win_info (enum tui_win_type type)
|
tui_alloc_win_info (enum tui_win_type type)
|
||||||
{
|
{
|
||||||
struct tui_win_info * win_info;
|
struct tui_win_info *win_info;
|
||||||
|
|
||||||
win_info = XMALLOC (struct tui_win_info);
|
win_info = XMALLOC (struct tui_win_info);
|
||||||
if (win_info != NULL)
|
if (win_info != NULL)
|
||||||
@ -588,7 +588,7 @@ tui_alloc_content (int num_elements, enum tui_win_type type)
|
|||||||
char *element_block_ptr;
|
char *element_block_ptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
content = xmalloc (sizeof (struct tui_win_element *) * num_elements);
|
content = xmalloc (sizeof (struct tui_win_element *) *num_elements);
|
||||||
if (content != NULL)
|
if (content != NULL)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -628,9 +628,9 @@ tui_alloc_content (int num_elements, enum tui_win_type type)
|
|||||||
there is a memory allocation error, in which case, (-1) is
|
there is a memory allocation error, in which case, (-1) is
|
||||||
returned. */
|
returned. */
|
||||||
int
|
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;
|
struct tui_win_element *element_ptr;
|
||||||
int i, index_start;
|
int i, index_start;
|
||||||
|
|
||||||
if (win_info->content == NULL)
|
if (win_info->content == NULL)
|
||||||
@ -662,9 +662,9 @@ tui_add_content_elements (struct tui_gen_win_info * win_info, int num_elements)
|
|||||||
/* Delete all curses windows associated with win_info, leaving everything
|
/* Delete all curses windows associated with win_info, leaving everything
|
||||||
else intact. */
|
else intact. */
|
||||||
void
|
void
|
||||||
tui_del_window (struct tui_win_info * win_info)
|
tui_del_window (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * generic_win;
|
struct tui_gen_win_info *generic_win;
|
||||||
|
|
||||||
switch (win_info->generic.type)
|
switch (win_info->generic.type)
|
||||||
{
|
{
|
||||||
@ -712,9 +712,9 @@ tui_del_window (struct tui_win_info * win_info)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_free_window (struct tui_win_info * win_info)
|
tui_free_window (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * generic_win;
|
struct tui_gen_win_info *generic_win;
|
||||||
|
|
||||||
switch (win_info->generic.type)
|
switch (win_info->generic.type)
|
||||||
{
|
{
|
||||||
@ -783,7 +783,7 @@ tui_free_all_source_wins_content (void)
|
|||||||
|
|
||||||
for (i = 0; i < (tui_source_windows ())->count; i++)
|
for (i = 0; i < (tui_source_windows ())->count; i++)
|
||||||
{
|
{
|
||||||
struct tui_win_info * win_info = (tui_source_windows ())->list[i];
|
struct tui_win_info *win_info = (tui_source_windows ())->list[i];
|
||||||
|
|
||||||
if (win_info != NULL)
|
if (win_info != NULL)
|
||||||
{
|
{
|
||||||
@ -795,7 +795,7 @@ tui_free_all_source_wins_content (void)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_free_win_content (struct tui_gen_win_info * win_info)
|
tui_free_win_content (struct tui_gen_win_info *win_info)
|
||||||
{
|
{
|
||||||
if (win_info->content != NULL)
|
if (win_info->content != NULL)
|
||||||
{
|
{
|
||||||
@ -819,7 +819,7 @@ tui_del_data_windows (tui_win_content content, int content_size)
|
|||||||
*/
|
*/
|
||||||
for (i = 0; i < content_size; i++)
|
for (i = 0; i < content_size; i++)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * generic_win = &content[i]->which_element.data_window;
|
struct tui_gen_win_info *generic_win = &content[i]->which_element.data_window;
|
||||||
|
|
||||||
if (generic_win != (struct tui_gen_win_info *) NULL)
|
if (generic_win != (struct tui_gen_win_info *) NULL)
|
||||||
{
|
{
|
||||||
@ -842,7 +842,7 @@ tui_free_data_content (tui_win_content content, int content_size)
|
|||||||
*/
|
*/
|
||||||
for (i = 0; i < content_size; i++)
|
for (i = 0; i < content_size; i++)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * generic_win = &content[i]->which_element.data_window;
|
struct tui_gen_win_info *generic_win = &content[i]->which_element.data_window;
|
||||||
|
|
||||||
if (generic_win != (struct tui_gen_win_info *) NULL)
|
if (generic_win != (struct tui_gen_win_info *) NULL)
|
||||||
{
|
{
|
||||||
@ -892,7 +892,7 @@ free_content_elements (tui_win_content content, int content_size, enum tui_win_t
|
|||||||
{
|
{
|
||||||
for (i = 0; i < content_size; i++)
|
for (i = 0; i < content_size; i++)
|
||||||
{
|
{
|
||||||
struct tui_win_element * element;
|
struct tui_win_element *element;
|
||||||
|
|
||||||
element = content[i];
|
element = content[i];
|
||||||
if (element != (struct tui_win_element *) NULL)
|
if (element != (struct tui_win_element *) NULL)
|
||||||
|
@ -264,7 +264,7 @@ struct tui_source_info
|
|||||||
struct tui_gen_win_info *execution_info;
|
struct tui_gen_win_info *execution_info;
|
||||||
int horizontal_offset; /* used for horizontal scroll */
|
int horizontal_offset; /* used for horizontal scroll */
|
||||||
struct tui_line_or_address start_line_or_addr;
|
struct tui_line_or_address start_line_or_addr;
|
||||||
char* filename;
|
char *filename;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -334,22 +334,22 @@ 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_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_source_exec_info_win_ptr (void);
|
||||||
extern struct tui_gen_win_info *tui_disassem_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 struct tui_list *tui_source_windows (void);
|
||||||
extern void tui_clear_source_windows (void);
|
extern void tui_clear_source_windows (void);
|
||||||
extern void tui_clear_source_windows_detail (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 *win_info);
|
||||||
extern void tui_add_to_source_windows (struct tui_win_info *);
|
extern void tui_add_to_source_windows (struct tui_win_info *);
|
||||||
extern int tui_default_tab_len (void);
|
extern int tui_default_tab_len (void);
|
||||||
extern void tui_set_default_tab_len (int);
|
extern void tui_set_default_tab_len (int);
|
||||||
extern struct tui_win_info *tui_win_with_focus (void);
|
extern struct tui_win_info *tui_win_with_focus (void);
|
||||||
extern void tui_set_win_with_focus (struct tui_win_info *);
|
extern void tui_set_win_with_focus (struct tui_win_info *);
|
||||||
extern struct tui_layout_def * tui_layout_def (void);
|
extern struct tui_layout_def *tui_layout_def (void);
|
||||||
extern int tui_win_resized (void);
|
extern int tui_win_resized (void);
|
||||||
extern void tui_set_win_resized_to (int);
|
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_next_win (struct tui_win_info *);
|
||||||
extern struct tui_win_info *tui_prev_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 *win_info);
|
||||||
|
|
||||||
#endif /* TUI_DATA_H */
|
#endif /* TUI_DATA_H */
|
||||||
|
@ -43,15 +43,15 @@
|
|||||||
struct tui_asm_line
|
struct tui_asm_line
|
||||||
{
|
{
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
char* addr_string;
|
char *addr_string;
|
||||||
char* insn;
|
char *insn;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Function to set the disassembly window's content.
|
/* Function to set the disassembly window's content.
|
||||||
Disassemble count lines starting at pc.
|
Disassemble count lines starting at pc.
|
||||||
Return address of the count'th instruction after pc. */
|
Return address of the count'th instruction after pc. */
|
||||||
static CORE_ADDR
|
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;
|
struct ui_file *gdb_dis_out;
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ tui_find_disassembly_address (CORE_ADDR pc, int from)
|
|||||||
CORE_ADDR new_low;
|
CORE_ADDR new_low;
|
||||||
int max_lines;
|
int max_lines;
|
||||||
int i;
|
int i;
|
||||||
struct tui_asm_line* asm_lines;
|
struct tui_asm_line *asm_lines;
|
||||||
|
|
||||||
max_lines = (from > 0) ? from : - from;
|
max_lines = (from > 0) ? from : - from;
|
||||||
if (max_lines <= 1)
|
if (max_lines <= 1)
|
||||||
@ -112,7 +112,7 @@ tui_find_disassembly_address (CORE_ADDR pc, int from)
|
|||||||
{
|
{
|
||||||
CORE_ADDR last_addr;
|
CORE_ADDR last_addr;
|
||||||
int pos;
|
int pos;
|
||||||
struct minimal_symbol* msymbol;
|
struct minimal_symbol *msymbol;
|
||||||
|
|
||||||
/* Find backward an address which is a symbol
|
/* Find backward an address which is a symbol
|
||||||
and for which disassembling from that address will fill
|
and for which disassembling from that address will fill
|
||||||
@ -174,12 +174,12 @@ tui_set_disassem_content (CORE_ADDR pc)
|
|||||||
int offset = TUI_DISASM_WIN->detail.source_info.horizontal_offset;
|
int offset = TUI_DISASM_WIN->detail.source_info.horizontal_offset;
|
||||||
int line_width, max_lines;
|
int line_width, max_lines;
|
||||||
CORE_ADDR cur_pc;
|
CORE_ADDR cur_pc;
|
||||||
struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||||
int tab_len = tui_default_tab_len ();
|
int tab_len = tui_default_tab_len ();
|
||||||
struct tui_asm_line* asm_lines;
|
struct tui_asm_line *asm_lines;
|
||||||
int insn_pos;
|
int insn_pos;
|
||||||
int addr_size, max_size;
|
int addr_size, max_size;
|
||||||
char* line;
|
char *line;
|
||||||
|
|
||||||
if (pc == 0)
|
if (pc == 0)
|
||||||
return TUI_FAILURE;
|
return TUI_FAILURE;
|
||||||
@ -226,8 +226,8 @@ tui_set_disassem_content (CORE_ADDR pc)
|
|||||||
/* Now construct each line */
|
/* Now construct each line */
|
||||||
for (i = 0; i < max_lines; i++)
|
for (i = 0; i < max_lines; i++)
|
||||||
{
|
{
|
||||||
struct tui_win_element * element;
|
struct tui_win_element *element;
|
||||||
struct tui_source_element* src;
|
struct tui_source_element *src;
|
||||||
int cur_len;
|
int cur_len;
|
||||||
|
|
||||||
element = (struct tui_win_element *) TUI_DISASM_WIN->generic.content[i];
|
element = (struct tui_win_element *) TUI_DISASM_WIN->generic.content[i];
|
||||||
@ -271,7 +271,7 @@ void
|
|||||||
tui_show_disassem (CORE_ADDR start_addr)
|
tui_show_disassem (CORE_ADDR start_addr)
|
||||||
{
|
{
|
||||||
struct symtab *s = find_pc_symtab (start_addr);
|
struct symtab *s = find_pc_symtab (start_addr);
|
||||||
struct tui_win_info * win_with_focus = tui_win_with_focus ();
|
struct tui_win_info *win_with_focus = tui_win_with_focus ();
|
||||||
struct tui_line_or_address val;
|
struct tui_line_or_address val;
|
||||||
|
|
||||||
val.loa = LOA_ADDRESS;
|
val.loa = LOA_ADDRESS;
|
||||||
@ -323,8 +323,8 @@ tui_show_disassem_and_update_source (CORE_ADDR start_addr)
|
|||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
tui_get_begin_asm_address (void)
|
tui_get_begin_asm_address (void)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * locator;
|
struct tui_gen_win_info *locator;
|
||||||
struct tui_locator_element * element;
|
struct tui_locator_element *element;
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
|
|
||||||
locator = tui_locator_win_info_ptr ();
|
locator = tui_locator_win_info_ptr ();
|
||||||
|
@ -68,7 +68,7 @@ tui_new_objfile_hook (struct objfile* objfile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int ATTR_FORMAT (printf, 1, 0)
|
static int ATTR_FORMAT (printf, 1, 0)
|
||||||
tui_query_hook (const char * msg, va_list argp)
|
tui_query_hook (const char *msg, va_list argp)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
int ans2;
|
int ans2;
|
||||||
|
@ -49,11 +49,11 @@ 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_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_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 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_command_window (struct tui_win_info **, int, int);
|
||||||
static void make_source_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);
|
static void make_disasm_window (struct tui_win_info **, int, int);
|
||||||
static void make_data_window (struct tui_win_info * *, int, int);
|
static void make_data_window (struct tui_win_info **, int, int);
|
||||||
static void show_source_command (void);
|
static void show_source_command (void);
|
||||||
static void show_disasm_command (void);
|
static void show_disasm_command (void);
|
||||||
static void show_source_disasm_command (void);
|
static void show_source_disasm_command (void);
|
||||||
@ -139,8 +139,8 @@ tui_set_layout (enum tui_layout_type layout_type,
|
|||||||
enum tui_layout_type cur_layout = tui_current_layout (), new_layout = UNDEFINED_LAYOUT;
|
enum tui_layout_type cur_layout = tui_current_layout (), new_layout = UNDEFINED_LAYOUT;
|
||||||
int regs_populate = FALSE;
|
int regs_populate = FALSE;
|
||||||
CORE_ADDR addr = extract_display_start_addr ();
|
CORE_ADDR addr = extract_display_start_addr ();
|
||||||
struct tui_win_info * win_with_focus = tui_win_with_focus ();
|
struct tui_win_info *win_with_focus = tui_win_with_focus ();
|
||||||
struct tui_layout_def * layout_def = tui_layout_def ();
|
struct tui_layout_def *layout_def = tui_layout_def ();
|
||||||
|
|
||||||
|
|
||||||
if (layout_type == UNDEFINED_LAYOUT &&
|
if (layout_type == UNDEFINED_LAYOUT &&
|
||||||
@ -535,7 +535,7 @@ extract_display_start_addr (void)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tui_handle_xdb_layout (struct tui_layout_def * layout_def)
|
tui_handle_xdb_layout (struct tui_layout_def *layout_def)
|
||||||
{
|
{
|
||||||
if (layout_def->split)
|
if (layout_def->split)
|
||||||
{
|
{
|
||||||
@ -555,7 +555,7 @@ tui_handle_xdb_layout (struct tui_layout_def * layout_def)
|
|||||||
static void
|
static void
|
||||||
tui_toggle_layout_command (char *arg, int from_tty)
|
tui_toggle_layout_command (char *arg, int from_tty)
|
||||||
{
|
{
|
||||||
struct tui_layout_def * layout_def = tui_layout_def ();
|
struct tui_layout_def *layout_def = tui_layout_def ();
|
||||||
|
|
||||||
/* Make sure the curses mode is enabled. */
|
/* Make sure the curses mode is enabled. */
|
||||||
tui_enable ();
|
tui_enable ();
|
||||||
@ -572,7 +572,7 @@ tui_toggle_layout_command (char *arg, int from_tty)
|
|||||||
static void
|
static void
|
||||||
tui_toggle_split_layout_command (char *arg, int from_tty)
|
tui_toggle_split_layout_command (char *arg, int from_tty)
|
||||||
{
|
{
|
||||||
struct tui_layout_def * layout_def = tui_layout_def ();
|
struct tui_layout_def *layout_def = tui_layout_def ();
|
||||||
|
|
||||||
/* Make sure the curses mode is enabled. */
|
/* Make sure the curses mode is enabled. */
|
||||||
tui_enable ();
|
tui_enable ();
|
||||||
@ -635,7 +635,7 @@ prev_layout (void)
|
|||||||
|
|
||||||
|
|
||||||
static 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,
|
*win_info_ptr = init_and_make_win (*win_info_ptr,
|
||||||
CMD_WIN,
|
CMD_WIN,
|
||||||
@ -653,7 +653,7 @@ make_command_window (struct tui_win_info * * win_info_ptr, int height, int origi
|
|||||||
** make_source_window().
|
** make_source_window().
|
||||||
*/
|
*/
|
||||||
static void
|
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);
|
make_source_or_disasm_window (win_info_ptr, SRC_WIN, height, origin_y);
|
||||||
|
|
||||||
@ -665,7 +665,7 @@ make_source_window (struct tui_win_info * * win_info_ptr, int height, int origin
|
|||||||
** make_disasm_window().
|
** make_disasm_window().
|
||||||
*/
|
*/
|
||||||
static void
|
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);
|
make_source_or_disasm_window (win_info_ptr, DISASSEM_WIN, height, origin_y);
|
||||||
|
|
||||||
@ -674,7 +674,7 @@ make_disasm_window (struct tui_win_info * * win_info_ptr, int height, int origin
|
|||||||
|
|
||||||
|
|
||||||
static void
|
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,
|
*win_info_ptr = init_and_make_win (*win_info_ptr,
|
||||||
DATA_WIN,
|
DATA_WIN,
|
||||||
@ -742,7 +742,7 @@ show_source_disasm_command (void)
|
|||||||
}
|
}
|
||||||
if (TUI_SRC_WIN != NULL)
|
if (TUI_SRC_WIN != NULL)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||||
|
|
||||||
tui_show_source_content (TUI_SRC_WIN);
|
tui_show_source_content (TUI_SRC_WIN);
|
||||||
if (TUI_DISASM_WIN == NULL)
|
if (TUI_DISASM_WIN == NULL)
|
||||||
@ -822,7 +822,7 @@ show_data (enum tui_layout_type new_layout)
|
|||||||
int total_height = (tui_term_height () - TUI_CMD_WIN->generic.height);
|
int total_height = (tui_term_height () - TUI_CMD_WIN->generic.height);
|
||||||
int src_height, data_height;
|
int src_height, data_height;
|
||||||
enum tui_win_type win_type;
|
enum tui_win_type win_type;
|
||||||
struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||||
|
|
||||||
|
|
||||||
data_height = total_height / 2;
|
data_height = total_height / 2;
|
||||||
@ -883,7 +883,7 @@ show_data (enum tui_layout_type new_layout)
|
|||||||
** init_gen_win_info().
|
** init_gen_win_info().
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
init_gen_win_info (struct tui_gen_win_info * win_info, enum tui_win_type type,
|
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 height, int width, int origin_x, int origin_y)
|
||||||
{
|
{
|
||||||
int h = height;
|
int h = height;
|
||||||
@ -913,7 +913,7 @@ 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 height, int width, int origin_x, int origin_y,
|
||||||
int box_it)
|
int box_it)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * generic;
|
struct tui_gen_win_info *generic;
|
||||||
|
|
||||||
if (opaque_win_info == NULL)
|
if (opaque_win_info == NULL)
|
||||||
{
|
{
|
||||||
@ -944,10 +944,10 @@ init_and_make_win (void *opaque_win_info, enum tui_win_type win_type,
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
make_source_or_disasm_window (struct tui_win_info * * win_info_ptr, enum tui_win_type type,
|
make_source_or_disasm_window (struct tui_win_info **win_info_ptr, enum tui_win_type type,
|
||||||
int height, int origin_y)
|
int height, int origin_y)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * execution_info = (struct tui_gen_win_info *) NULL;
|
struct tui_gen_win_info *execution_info = (struct tui_gen_win_info *) NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Create the exeuction info window.
|
** Create the exeuction info window.
|
||||||
@ -984,9 +984,9 @@ show_source_or_disasm_and_command (enum tui_layout_type layout_type)
|
|||||||
{
|
{
|
||||||
if (tui_current_layout () != layout_type)
|
if (tui_current_layout () != layout_type)
|
||||||
{
|
{
|
||||||
struct tui_win_info * *win_info_ptr;
|
struct tui_win_info **win_info_ptr;
|
||||||
int src_height, cmd_height;
|
int src_height, cmd_height;
|
||||||
struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||||
|
|
||||||
if (TUI_CMD_WIN != NULL)
|
if (TUI_CMD_WIN != NULL)
|
||||||
cmd_height = TUI_CMD_WIN->generic.height;
|
cmd_height = TUI_CMD_WIN->generic.height;
|
||||||
|
@ -364,8 +364,8 @@ tui_display_registers_from (int start_element_no)
|
|||||||
(j < display_info->regs_column_count &&
|
(j < display_info->regs_column_count &&
|
||||||
i < display_info->regs_content_count); j++)
|
i < display_info->regs_content_count); j++)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * data_item_win;
|
struct tui_gen_win_info *data_item_win;
|
||||||
struct tui_data_element * data_element_ptr;
|
struct tui_data_element *data_element_ptr;
|
||||||
|
|
||||||
/* create the window if necessary */
|
/* create the window if necessary */
|
||||||
data_item_win = &display_info->regs_content[i]
|
data_item_win = &display_info->regs_content[i]
|
||||||
|
@ -88,8 +88,8 @@ tui_set_source_content (struct symtab *s, int line_no, int noerror)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
int offset, cur_line_no, cur_line, cur_len, threshold;
|
int offset, cur_line_no, cur_line, cur_len, threshold;
|
||||||
struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||||
struct tui_source_info * src = &TUI_SRC_WIN->detail.source_info;
|
struct tui_source_info *src = &TUI_SRC_WIN->detail.source_info;
|
||||||
|
|
||||||
if (TUI_SRC_WIN->generic.title)
|
if (TUI_SRC_WIN->generic.title)
|
||||||
xfree (TUI_SRC_WIN->generic.title);
|
xfree (TUI_SRC_WIN->generic.title);
|
||||||
@ -113,7 +113,7 @@ tui_set_source_content (struct symtab *s, int line_no, int noerror)
|
|||||||
(threshold + 1) * sizeof (char));
|
(threshold + 1) * sizeof (char));
|
||||||
while (cur_line < nlines)
|
while (cur_line < nlines)
|
||||||
{
|
{
|
||||||
struct tui_win_element * element = (struct tui_win_element *)
|
struct tui_win_element *element = (struct tui_win_element *)
|
||||||
TUI_SRC_WIN->generic.content[cur_line];
|
TUI_SRC_WIN->generic.content[cur_line];
|
||||||
|
|
||||||
/* get the first character in the line */
|
/* get the first character in the line */
|
||||||
@ -239,7 +239,7 @@ tui_set_source_content (struct symtab *s, int line_no, int noerror)
|
|||||||
source files cannot be accessed. */
|
source files cannot be accessed. */
|
||||||
|
|
||||||
void
|
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 line_width;
|
||||||
int n_lines;
|
int n_lines;
|
||||||
@ -256,8 +256,8 @@ tui_set_source_content_nil (struct tui_win_info * win_info, char *warning_string
|
|||||||
to null: i.e. the line number is 0, there is no bp,
|
to null: i.e. the line number is 0, there is no bp,
|
||||||
it is not where the program is stopped */
|
it is not where the program is stopped */
|
||||||
|
|
||||||
struct tui_win_element * element =
|
struct tui_win_element *element =
|
||||||
(struct tui_win_element *) win_info->generic.content[curr_line];
|
(struct tui_win_element *) win_info->generic.content[curr_line];
|
||||||
element->which_element.source.line_or_addr.loa = LOA_LINE;
|
element->which_element.source.line_or_addr.loa = LOA_LINE;
|
||||||
element->which_element.source.line_or_addr.u.line_no = 0;
|
element->which_element.source.line_or_addr.u.line_no = 0;
|
||||||
element->which_element.source.is_exec_point = FALSE;
|
element->which_element.source.is_exec_point = FALSE;
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
/* Get a printable name for the function at the address.
|
/* Get a printable name for the function at the address.
|
||||||
The symbol name is demangled if demangling is turned on.
|
The symbol name is demangled if demangling is turned on.
|
||||||
Returns a pointer to a static area holding the result. */
|
Returns a pointer to a static area holding the result. */
|
||||||
static char* tui_get_function_from_frame (struct frame_info *fi);
|
static char *tui_get_function_from_frame (struct frame_info *fi);
|
||||||
|
|
||||||
/* Set the filename portion of the locator. */
|
/* Set the filename portion of the locator. */
|
||||||
static void tui_set_locator_filename (const char *filename);
|
static void tui_set_locator_filename (const char *filename);
|
||||||
@ -60,15 +60,15 @@ static void tui_update_command (char *, int);
|
|||||||
can on this single line: target name, process number, current
|
can on this single line: target name, process number, current
|
||||||
function, current line, current PC, SingleKey mode. */
|
function, current line, current PC, SingleKey mode. */
|
||||||
static char*
|
static char*
|
||||||
tui_make_status_line (struct tui_locator_element* loc)
|
tui_make_status_line (struct tui_locator_element *loc)
|
||||||
{
|
{
|
||||||
char* string;
|
char *string;
|
||||||
char line_buf[50], *pname;
|
char line_buf[50], *pname;
|
||||||
char* buf;
|
char *buf;
|
||||||
int status_size;
|
int status_size;
|
||||||
int i, proc_width;
|
int i, proc_width;
|
||||||
const char* pid_name;
|
const char *pid_name;
|
||||||
const char* pc_buf;
|
const char *pc_buf;
|
||||||
int target_width;
|
int target_width;
|
||||||
int pid_width;
|
int pid_width;
|
||||||
int line_width;
|
int line_width;
|
||||||
@ -242,13 +242,13 @@ void
|
|||||||
tui_show_locator_content (void)
|
tui_show_locator_content (void)
|
||||||
{
|
{
|
||||||
char *string;
|
char *string;
|
||||||
struct tui_gen_win_info * locator;
|
struct tui_gen_win_info *locator;
|
||||||
|
|
||||||
locator = tui_locator_win_info_ptr ();
|
locator = tui_locator_win_info_ptr ();
|
||||||
|
|
||||||
if (locator != NULL && locator->handle != (WINDOW *) NULL)
|
if (locator != NULL && locator->handle != (WINDOW *) NULL)
|
||||||
{
|
{
|
||||||
struct tui_win_element * element;
|
struct tui_win_element *element;
|
||||||
|
|
||||||
element = (struct tui_win_element *) locator->content[0];
|
element = (struct tui_win_element *) locator->content[0];
|
||||||
|
|
||||||
@ -270,8 +270,8 @@ tui_show_locator_content (void)
|
|||||||
static void
|
static void
|
||||||
tui_set_locator_filename (const char *filename)
|
tui_set_locator_filename (const char *filename)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||||
struct tui_locator_element * element;
|
struct tui_locator_element *element;
|
||||||
|
|
||||||
if (locator->content[0] == NULL)
|
if (locator->content[0] == NULL)
|
||||||
{
|
{
|
||||||
@ -289,8 +289,8 @@ 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)
|
CORE_ADDR addr)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||||
struct tui_locator_element * element;
|
struct tui_locator_element *element;
|
||||||
|
|
||||||
/* Allocate the locator content if necessary. */
|
/* Allocate the locator content if necessary. */
|
||||||
if (locator->content_size <= 0)
|
if (locator->content_size <= 0)
|
||||||
@ -319,14 +319,14 @@ tui_update_locator_filename (const char *filename)
|
|||||||
void
|
void
|
||||||
tui_show_frame_info (struct frame_info *fi)
|
tui_show_frame_info (struct frame_info *fi)
|
||||||
{
|
{
|
||||||
struct tui_win_info * win_info;
|
struct tui_win_info *win_info;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (fi)
|
if (fi)
|
||||||
{
|
{
|
||||||
int start_line, i;
|
int start_line, i;
|
||||||
CORE_ADDR low;
|
CORE_ADDR low;
|
||||||
struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||||
int source_already_displayed;
|
int source_already_displayed;
|
||||||
struct symtab_and_line sal;
|
struct symtab_and_line sal;
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ static void tui_scroll_forward_command (char *, int);
|
|||||||
static void tui_scroll_backward_command (char *, int);
|
static void tui_scroll_backward_command (char *, int);
|
||||||
static void tui_scroll_left_command (char *, int);
|
static void tui_scroll_left_command (char *, int);
|
||||||
static void tui_scroll_right_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 *);
|
||||||
|
|
||||||
|
|
||||||
/***************************************
|
/***************************************
|
||||||
@ -463,11 +463,11 @@ tui_update_gdb_sizes (void)
|
|||||||
|
|
||||||
/* Set the logical focus to win_info. */
|
/* Set the logical focus to win_info. */
|
||||||
void
|
void
|
||||||
tui_set_win_focus_to (struct tui_win_info * win_info)
|
tui_set_win_focus_to (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
if (win_info != NULL)
|
if (win_info != NULL)
|
||||||
{
|
{
|
||||||
struct tui_win_info * win_with_focus = tui_win_with_focus ();
|
struct tui_win_info *win_with_focus = tui_win_with_focus ();
|
||||||
|
|
||||||
if (win_with_focus != NULL
|
if (win_with_focus != NULL
|
||||||
&& win_with_focus->generic.type != CMD_WIN)
|
&& win_with_focus->generic.type != CMD_WIN)
|
||||||
@ -480,7 +480,7 @@ tui_set_win_focus_to (struct tui_win_info * win_info)
|
|||||||
|
|
||||||
|
|
||||||
void
|
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)
|
if (win_to_scroll != TUI_CMD_WIN)
|
||||||
{
|
{
|
||||||
@ -504,7 +504,7 @@ tui_scroll_forward (struct tui_win_info * win_to_scroll, int num_to_scroll)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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)
|
if (win_to_scroll != TUI_CMD_WIN)
|
||||||
{
|
{
|
||||||
@ -529,7 +529,7 @@ tui_scroll_backward (struct tui_win_info * win_to_scroll, int num_to_scroll)
|
|||||||
|
|
||||||
|
|
||||||
void
|
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)
|
if (win_to_scroll != TUI_CMD_WIN)
|
||||||
{
|
{
|
||||||
@ -550,7 +550,7 @@ tui_scroll_left (struct tui_win_info * win_to_scroll, int num_to_scroll)
|
|||||||
|
|
||||||
|
|
||||||
void
|
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)
|
if (win_to_scroll != TUI_CMD_WIN)
|
||||||
{
|
{
|
||||||
@ -573,7 +573,7 @@ tui_scroll_right (struct tui_win_info * win_to_scroll, int num_to_scroll)
|
|||||||
/* Scroll a window. Arguments are passed through a va_list. */
|
/* Scroll a window. Arguments are passed through a va_list. */
|
||||||
void
|
void
|
||||||
tui_scroll (enum tui_scroll_direction direction,
|
tui_scroll (enum tui_scroll_direction direction,
|
||||||
struct tui_win_info * win_to_scroll,
|
struct tui_win_info *win_to_scroll,
|
||||||
int num_to_scroll)
|
int num_to_scroll)
|
||||||
{
|
{
|
||||||
switch (direction)
|
switch (direction)
|
||||||
@ -642,10 +642,10 @@ tui_resize_all (void)
|
|||||||
if (height_diff || width_diff)
|
if (height_diff || width_diff)
|
||||||
{
|
{
|
||||||
enum tui_layout_type cur_layout = tui_current_layout ();
|
enum tui_layout_type cur_layout = tui_current_layout ();
|
||||||
struct tui_win_info * win_with_focus = tui_win_with_focus ();
|
struct tui_win_info *win_with_focus = tui_win_with_focus ();
|
||||||
struct tui_win_info *first_win;
|
struct tui_win_info *first_win;
|
||||||
struct tui_win_info *second_win;
|
struct tui_win_info *second_win;
|
||||||
struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||||
enum tui_win_type win_type;
|
enum tui_win_type win_type;
|
||||||
int new_height, split_diff, cmd_split_diff, num_wins_displayed = 2;
|
int new_height, split_diff, cmd_split_diff, num_wins_displayed = 2;
|
||||||
|
|
||||||
@ -811,7 +811,7 @@ static void
|
|||||||
tui_scroll_forward_command (char *arg, int from_tty)
|
tui_scroll_forward_command (char *arg, int from_tty)
|
||||||
{
|
{
|
||||||
int num_to_scroll = 1;
|
int num_to_scroll = 1;
|
||||||
struct tui_win_info * win_to_scroll;
|
struct tui_win_info *win_to_scroll;
|
||||||
|
|
||||||
/* Make sure the curses mode is enabled. */
|
/* Make sure the curses mode is enabled. */
|
||||||
tui_enable ();
|
tui_enable ();
|
||||||
@ -827,7 +827,7 @@ static void
|
|||||||
tui_scroll_backward_command (char *arg, int from_tty)
|
tui_scroll_backward_command (char *arg, int from_tty)
|
||||||
{
|
{
|
||||||
int num_to_scroll = 1;
|
int num_to_scroll = 1;
|
||||||
struct tui_win_info * win_to_scroll;
|
struct tui_win_info *win_to_scroll;
|
||||||
|
|
||||||
/* Make sure the curses mode is enabled. */
|
/* Make sure the curses mode is enabled. */
|
||||||
tui_enable ();
|
tui_enable ();
|
||||||
@ -843,7 +843,7 @@ static void
|
|||||||
tui_scroll_left_command (char *arg, int from_tty)
|
tui_scroll_left_command (char *arg, int from_tty)
|
||||||
{
|
{
|
||||||
int num_to_scroll;
|
int num_to_scroll;
|
||||||
struct tui_win_info * win_to_scroll;
|
struct tui_win_info *win_to_scroll;
|
||||||
|
|
||||||
/* Make sure the curses mode is enabled. */
|
/* Make sure the curses mode is enabled. */
|
||||||
tui_enable ();
|
tui_enable ();
|
||||||
@ -856,7 +856,7 @@ static void
|
|||||||
tui_scroll_right_command (char *arg, int from_tty)
|
tui_scroll_right_command (char *arg, int from_tty)
|
||||||
{
|
{
|
||||||
int num_to_scroll;
|
int num_to_scroll;
|
||||||
struct tui_win_info * win_to_scroll;
|
struct tui_win_info *win_to_scroll;
|
||||||
|
|
||||||
/* Make sure the curses mode is enabled. */
|
/* Make sure the curses mode is enabled. */
|
||||||
tui_enable ();
|
tui_enable ();
|
||||||
@ -873,7 +873,7 @@ tui_set_focus (char *arg, int from_tty)
|
|||||||
{
|
{
|
||||||
char *buf_ptr = (char *) xstrdup (arg);
|
char *buf_ptr = (char *) xstrdup (arg);
|
||||||
int i;
|
int i;
|
||||||
struct tui_win_info * win_info = (struct tui_win_info *) NULL;
|
struct tui_win_info *win_info = (struct tui_win_info *) NULL;
|
||||||
|
|
||||||
for (i = 0; (i < strlen (buf_ptr)); i++)
|
for (i = 0; (i < strlen (buf_ptr)); i++)
|
||||||
buf_ptr[i] = toupper (arg[i]);
|
buf_ptr[i] = toupper (arg[i]);
|
||||||
@ -917,7 +917,7 @@ static void
|
|||||||
tui_all_windows_info (char *arg, int from_tty)
|
tui_all_windows_info (char *arg, int from_tty)
|
||||||
{
|
{
|
||||||
enum tui_win_type type;
|
enum tui_win_type type;
|
||||||
struct tui_win_info * win_with_focus = tui_win_with_focus ();
|
struct tui_win_info *win_with_focus = tui_win_with_focus ();
|
||||||
|
|
||||||
for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
|
for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
|
||||||
if (tui_win_list[type] && tui_win_list[type]->generic.is_visible)
|
if (tui_win_list[type] && tui_win_list[type]->generic.is_visible)
|
||||||
@ -975,7 +975,7 @@ tui_set_win_height (char *arg, int from_tty)
|
|||||||
char *buf_ptr = buf;
|
char *buf_ptr = buf;
|
||||||
char *wname = (char *) NULL;
|
char *wname = (char *) NULL;
|
||||||
int new_height, i;
|
int new_height, i;
|
||||||
struct tui_win_info * win_info;
|
struct tui_win_info *win_info;
|
||||||
|
|
||||||
wname = buf_ptr;
|
wname = buf_ptr;
|
||||||
buf_ptr = strchr (buf_ptr, ' ');
|
buf_ptr = strchr (buf_ptr, ' ');
|
||||||
@ -1097,7 +1097,7 @@ tui_xdb_set_win_height_command (char *arg, int from_tty)
|
|||||||
|
|
||||||
/* Function to adjust all window heights around the primary. */
|
/* Function to adjust all window heights around the primary. */
|
||||||
static enum tui_status
|
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;
|
enum tui_status status = TUI_FAILURE;
|
||||||
|
|
||||||
@ -1107,14 +1107,14 @@ tui_adjust_win_heights (struct tui_win_info * primary_win_info, int new_height)
|
|||||||
if (new_height != primary_win_info->generic.height)
|
if (new_height != primary_win_info->generic.height)
|
||||||
{
|
{
|
||||||
int diff;
|
int diff;
|
||||||
struct tui_win_info * win_info;
|
struct tui_win_info *win_info;
|
||||||
struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||||
enum tui_layout_type cur_layout = tui_current_layout ();
|
enum tui_layout_type cur_layout = tui_current_layout ();
|
||||||
|
|
||||||
diff = (new_height - primary_win_info->generic.height) * (-1);
|
diff = (new_height - primary_win_info->generic.height) * (-1);
|
||||||
if (cur_layout == SRC_COMMAND || cur_layout == DISASSEM_COMMAND)
|
if (cur_layout == SRC_COMMAND || cur_layout == DISASSEM_COMMAND)
|
||||||
{
|
{
|
||||||
struct tui_win_info * src_win_info;
|
struct tui_win_info *src_win_info;
|
||||||
|
|
||||||
make_invisible_and_set_new_height (primary_win_info, new_height);
|
make_invisible_and_set_new_height (primary_win_info, new_height);
|
||||||
if (primary_win_info->generic.type == CMD_WIN)
|
if (primary_win_info->generic.type == CMD_WIN)
|
||||||
@ -1249,10 +1249,10 @@ tui_adjust_win_heights (struct tui_win_info * primary_win_info, int new_height)
|
|||||||
/* Function make the target window (and auxillary windows associated
|
/* Function make the target window (and auxillary windows associated
|
||||||
with the targer) invisible, and set the new height and location. */
|
with the targer) invisible, and set the new height and location. */
|
||||||
static void
|
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;
|
int i;
|
||||||
struct tui_gen_win_info * gen_win_info;
|
struct tui_gen_win_info *gen_win_info;
|
||||||
|
|
||||||
tui_make_invisible (&win_info->generic);
|
tui_make_invisible (&win_info->generic);
|
||||||
win_info->generic.height = height;
|
win_info->generic.height = height;
|
||||||
@ -1306,7 +1306,7 @@ make_invisible_and_set_new_height (struct tui_win_info * win_info, int height)
|
|||||||
re-creating the windows' content since the window had to be
|
re-creating the windows' content since the window had to be
|
||||||
destroyed to be made invisible. */
|
destroyed to be made invisible. */
|
||||||
static void
|
static void
|
||||||
make_visible_with_new_height (struct tui_win_info * win_info)
|
make_visible_with_new_height (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
struct symtab *s;
|
struct symtab *s;
|
||||||
|
|
||||||
@ -1370,7 +1370,7 @@ make_visible_with_new_height (struct tui_win_info * win_info)
|
|||||||
|
|
||||||
|
|
||||||
static int
|
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 ());
|
int ok = (new_height < tui_term_height ());
|
||||||
|
|
||||||
@ -1390,7 +1390,7 @@ new_height_ok (struct tui_win_info * primary_win_info, int new_height)
|
|||||||
new_height >= MIN_WIN_HEIGHT));
|
new_height >= MIN_WIN_HEIGHT));
|
||||||
if (ok)
|
if (ok)
|
||||||
{ /* check the total height */
|
{ /* check the total height */
|
||||||
struct tui_win_info * win_info;
|
struct tui_win_info *win_info;
|
||||||
|
|
||||||
if (primary_win_info == TUI_CMD_WIN)
|
if (primary_win_info == TUI_CMD_WIN)
|
||||||
win_info = (tui_source_windows ())->list[0];
|
win_info = (tui_source_windows ())->list[0];
|
||||||
@ -1484,7 +1484,7 @@ new_height_ok (struct tui_win_info * primary_win_info, int new_height)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
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)
|
int *num_to_scroll)
|
||||||
{
|
{
|
||||||
if (num_to_scroll)
|
if (num_to_scroll)
|
||||||
|
@ -53,7 +53,7 @@ tui_first_data_item_displayed (void)
|
|||||||
|
|
||||||
for (i = 0; (i < TUI_DATA_WIN->generic.content_size && element_no < 0); i++)
|
for (i = 0; (i < TUI_DATA_WIN->generic.content_size && element_no < 0); i++)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * data_item_win;
|
struct tui_gen_win_info *data_item_win;
|
||||||
|
|
||||||
data_item_win = &((tui_win_content)
|
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;
|
||||||
@ -92,7 +92,7 @@ void
|
|||||||
tui_delete_data_content_windows (void)
|
tui_delete_data_content_windows (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct tui_gen_win_info * data_item_win_ptr;
|
struct tui_gen_win_info *data_item_win_ptr;
|
||||||
|
|
||||||
for (i = 0; (i < TUI_DATA_WIN->generic.content_size); i++)
|
for (i = 0; (i < TUI_DATA_WIN->generic.content_size); i++)
|
||||||
{
|
{
|
||||||
@ -249,7 +249,7 @@ tui_check_data_values (struct frame_info *frame)
|
|||||||
{
|
{
|
||||||
#ifdef LATER
|
#ifdef LATER
|
||||||
tui_data_element_ptr data_element_ptr;
|
tui_data_element_ptr data_element_ptr;
|
||||||
struct tui_gen_win_info * data_item_win_ptr;
|
struct tui_gen_win_info *data_item_win_ptr;
|
||||||
Opaque new_value;
|
Opaque new_value;
|
||||||
|
|
||||||
data_item_ptr = &TUI_DATA_WIN->detail.data_display_info.
|
data_item_ptr = &TUI_DATA_WIN->detail.data_display_info.
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
/* Refresh the window. */
|
/* Refresh the window. */
|
||||||
void
|
void
|
||||||
tui_refresh_win (struct tui_gen_win_info * win_info)
|
tui_refresh_win (struct tui_gen_win_info *win_info)
|
||||||
{
|
{
|
||||||
if (win_info->type == DATA_WIN && win_info->content_size > 0)
|
if (win_info->type == DATA_WIN && win_info->content_size > 0)
|
||||||
{
|
{
|
||||||
@ -44,7 +44,7 @@ tui_refresh_win (struct tui_gen_win_info * win_info)
|
|||||||
|
|
||||||
for (i = 0; (i < win_info->content_size); i++)
|
for (i = 0; (i < win_info->content_size); i++)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * data_item_win_ptr;
|
struct tui_gen_win_info *data_item_win_ptr;
|
||||||
|
|
||||||
data_item_win_ptr = &((tui_win_content)
|
data_item_win_ptr = &((tui_win_content)
|
||||||
win_info->content)[i]->which_element.data_window;
|
win_info->content)[i]->which_element.data_window;
|
||||||
@ -69,7 +69,7 @@ tui_refresh_win (struct tui_gen_win_info * win_info)
|
|||||||
|
|
||||||
/* Function to delete the curses window, checking for NULL. */
|
/* Function to delete the curses window, checking for NULL. */
|
||||||
void
|
void
|
||||||
tui_delete_win (WINDOW * window)
|
tui_delete_win (WINDOW *window)
|
||||||
{
|
{
|
||||||
if (window != (WINDOW *) NULL)
|
if (window != (WINDOW *) NULL)
|
||||||
delwin (window);
|
delwin (window);
|
||||||
@ -80,7 +80,7 @@ tui_delete_win (WINDOW * window)
|
|||||||
|
|
||||||
/* Draw a border arround the window. */
|
/* Draw a border arround the window. */
|
||||||
void
|
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)
|
if (win_info && win_info->handle)
|
||||||
{
|
{
|
||||||
@ -110,7 +110,7 @@ box_win (struct tui_gen_win_info * win_info, int highlight_flag)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_unhighlight_win (struct tui_win_info * win_info)
|
tui_unhighlight_win (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
if (win_info != NULL && win_info->generic.handle != (WINDOW *) NULL)
|
if (win_info != NULL && win_info->generic.handle != (WINDOW *) NULL)
|
||||||
{
|
{
|
||||||
@ -122,7 +122,7 @@ tui_unhighlight_win (struct tui_win_info * win_info)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_highlight_win (struct tui_win_info * win_info)
|
tui_highlight_win (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
if (win_info != NULL
|
if (win_info != NULL
|
||||||
&& win_info->can_highlight
|
&& win_info->can_highlight
|
||||||
@ -135,7 +135,7 @@ tui_highlight_win (struct tui_win_info * win_info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_check_and_display_highlight_if_needed (struct tui_win_info * win_info)
|
tui_check_and_display_highlight_if_needed (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
if (win_info != NULL && win_info->generic.type != CMD_WIN)
|
if (win_info != NULL && win_info->generic.type != CMD_WIN)
|
||||||
{
|
{
|
||||||
@ -150,7 +150,7 @@ tui_check_and_display_highlight_if_needed (struct tui_win_info * win_info)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_make_window (struct tui_gen_win_info * win_info, int box_it)
|
tui_make_window (struct tui_gen_win_info *win_info, int box_it)
|
||||||
{
|
{
|
||||||
WINDOW *handle;
|
WINDOW *handle;
|
||||||
|
|
||||||
@ -249,10 +249,10 @@ tui_make_all_invisible (void)
|
|||||||
/* Function to refresh all the windows currently displayed. */
|
/* Function to refresh all the windows currently displayed. */
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_refresh_all (struct tui_win_info * * list)
|
tui_refresh_all (struct tui_win_info **list)
|
||||||
{
|
{
|
||||||
enum tui_win_type type;
|
enum tui_win_type type;
|
||||||
struct tui_gen_win_info * locator = tui_locator_win_info_ptr ();
|
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
|
||||||
|
|
||||||
for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
|
for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ extern void tui_box_win (struct tui_gen_win_info *, int);
|
|||||||
extern void tui_highlight_win (struct tui_win_info *);
|
extern void tui_highlight_win (struct tui_win_info *);
|
||||||
extern void tui_check_and_display_highlight_if_needed (struct tui_win_info *);
|
extern void tui_check_and_display_highlight_if_needed (struct tui_win_info *);
|
||||||
extern void tui_refresh_all (struct tui_win_info **);
|
extern void tui_refresh_all (struct tui_win_info **);
|
||||||
extern void tui_delete_win (WINDOW * window);
|
extern void tui_delete_win (WINDOW *window);
|
||||||
extern void tui_refresh_win (struct tui_gen_win_info *);
|
extern void tui_refresh_win (struct tui_gen_win_info *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -71,7 +71,7 @@ tui_display_main (void)
|
|||||||
/* Function to display source in the source window. This function
|
/* Function to display source in the source window. This function
|
||||||
initializes the horizontal scroll to 0. */
|
initializes the horizontal scroll to 0. */
|
||||||
void
|
void
|
||||||
tui_update_source_window (struct tui_win_info * win_info, struct symtab *s,
|
tui_update_source_window (struct tui_win_info *win_info, struct symtab *s,
|
||||||
struct tui_line_or_address line_or_addr, int noerror)
|
struct tui_line_or_address line_or_addr, int noerror)
|
||||||
{
|
{
|
||||||
win_info->detail.source_info.horizontal_offset = 0;
|
win_info->detail.source_info.horizontal_offset = 0;
|
||||||
@ -84,7 +84,7 @@ tui_update_source_window (struct tui_win_info * win_info, struct symtab *s,
|
|||||||
/* Function to display source in the source/asm window. This function
|
/* Function to display source in the source/asm window. This function
|
||||||
shows the source as specified by the horizontal offset. */
|
shows the source as specified by the horizontal offset. */
|
||||||
void
|
void
|
||||||
tui_update_source_window_as_is (struct tui_win_info * win_info, struct symtab *s,
|
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)
|
struct tui_line_or_address line_or_addr, int noerror)
|
||||||
{
|
{
|
||||||
enum tui_status ret;
|
enum tui_status ret;
|
||||||
@ -160,7 +160,7 @@ tui_update_source_windows_with_addr (CORE_ADDR addr)
|
|||||||
|
|
||||||
for (i = 0; i < (tui_source_windows ())->count; i++)
|
for (i = 0; i < (tui_source_windows ())->count; i++)
|
||||||
{
|
{
|
||||||
struct tui_win_info * win_info = (tui_source_windows ())->list[i];
|
struct tui_win_info *win_info = (tui_source_windows ())->list[i];
|
||||||
|
|
||||||
tui_clear_source_content (win_info, EMPTY_SOURCE_PROMPT);
|
tui_clear_source_content (win_info, EMPTY_SOURCE_PROMPT);
|
||||||
tui_clear_exec_info_content (win_info);
|
tui_clear_exec_info_content (win_info);
|
||||||
@ -199,7 +199,7 @@ tui_update_source_windows_with_line (struct symtab *s, int line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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)
|
if (win_info != NULL)
|
||||||
{
|
{
|
||||||
@ -209,7 +209,7 @@ tui_clear_source_content (struct tui_win_info * win_info, int display_prompt)
|
|||||||
tui_erase_source_content (win_info, display_prompt);
|
tui_erase_source_content (win_info, display_prompt);
|
||||||
for (i = 0; i < win_info->generic.content_size; i++)
|
for (i = 0; i < win_info->generic.content_size; i++)
|
||||||
{
|
{
|
||||||
struct tui_win_element * element =
|
struct tui_win_element *element =
|
||||||
(struct tui_win_element *) win_info->generic.content[i];
|
(struct tui_win_element *) win_info->generic.content[i];
|
||||||
element->which_element.source.has_break = FALSE;
|
element->which_element.source.has_break = FALSE;
|
||||||
element->which_element.source.is_exec_point = FALSE;
|
element->which_element.source.is_exec_point = FALSE;
|
||||||
@ -219,7 +219,7 @@ tui_clear_source_content (struct tui_win_info * win_info, int display_prompt)
|
|||||||
|
|
||||||
|
|
||||||
void
|
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 x_pos;
|
||||||
int half_width = (win_info->generic.width - 2) / 2;
|
int half_width = (win_info->generic.width - 2) / 2;
|
||||||
@ -259,9 +259,9 @@ tui_erase_source_content (struct tui_win_info * win_info, int display_prompt)
|
|||||||
|
|
||||||
/* Redraw the complete line of a source or disassembly window. */
|
/* Redraw the complete line of a source or disassembly window. */
|
||||||
static void
|
static void
|
||||||
tui_show_source_line (struct tui_win_info * win_info, int lineno)
|
tui_show_source_line (struct tui_win_info *win_info, int lineno)
|
||||||
{
|
{
|
||||||
struct tui_win_element * line;
|
struct tui_win_element *line;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
line = (struct tui_win_element *) win_info->generic.content[lineno - 1];
|
line = (struct tui_win_element *) win_info->generic.content[lineno - 1];
|
||||||
@ -283,7 +283,7 @@ tui_show_source_line (struct tui_win_info * win_info, int lineno)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_show_source_content (struct tui_win_info * win_info)
|
tui_show_source_content (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
if (win_info->generic.content_size > 0)
|
if (win_info->generic.content_size > 0)
|
||||||
{
|
{
|
||||||
@ -303,7 +303,7 @@ tui_show_source_content (struct tui_win_info * win_info)
|
|||||||
|
|
||||||
/* Scroll the source forward or backward horizontally. */
|
/* Scroll the source forward or backward horizontally. */
|
||||||
void
|
void
|
||||||
tui_horizontal_source_scroll (struct tui_win_info * win_info,
|
tui_horizontal_source_scroll (struct tui_win_info *win_info,
|
||||||
enum tui_scroll_direction direction,
|
enum tui_scroll_direction direction,
|
||||||
int num_to_scroll)
|
int num_to_scroll)
|
||||||
{
|
{
|
||||||
@ -339,7 +339,7 @@ tui_horizontal_source_scroll (struct tui_win_info * win_info,
|
|||||||
|
|
||||||
/* Set or clear the has_break flag in the line whose line is line_no. */
|
/* Set or clear the has_break flag in the line whose line is line_no. */
|
||||||
void
|
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 changed = 0;
|
||||||
int i;
|
int i;
|
||||||
@ -384,7 +384,7 @@ tui_update_all_breakpoint_info (void)
|
|||||||
|
|
||||||
for (i = 0; i < list->count; i++)
|
for (i = 0; i < list->count; i++)
|
||||||
{
|
{
|
||||||
struct tui_win_info * win = list->list[i];
|
struct tui_win_info *win = list->list[i];
|
||||||
|
|
||||||
if (tui_update_breakpoint_info (win, FALSE))
|
if (tui_update_breakpoint_info (win, FALSE))
|
||||||
{
|
{
|
||||||
@ -399,18 +399,18 @@ tui_update_all_breakpoint_info (void)
|
|||||||
Returns 1 if something changed and the execution window
|
Returns 1 if something changed and the execution window
|
||||||
must be refreshed. */
|
must be refreshed. */
|
||||||
int
|
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 i;
|
||||||
int need_refresh = 0;
|
int need_refresh = 0;
|
||||||
struct tui_source_info * src = &win->detail.source_info;
|
struct tui_source_info *src = &win->detail.source_info;
|
||||||
|
|
||||||
for (i = 0; i < win->generic.content_size; i++)
|
for (i = 0; i < win->generic.content_size; i++)
|
||||||
{
|
{
|
||||||
struct breakpoint *bp;
|
struct breakpoint *bp;
|
||||||
extern struct breakpoint *breakpoint_chain;
|
extern struct breakpoint *breakpoint_chain;
|
||||||
int mode;
|
int mode;
|
||||||
struct tui_source_element* line;
|
struct tui_source_element *line;
|
||||||
|
|
||||||
line = &((struct tui_win_element *) win->generic.content[i])->which_element.source;
|
line = &((struct tui_win_element *) win->generic.content[i])->which_element.source;
|
||||||
if (current_only && !line->is_exec_point)
|
if (current_only && !line->is_exec_point)
|
||||||
@ -461,13 +461,13 @@ tui_update_breakpoint_info (struct tui_win_info * win, int current_only)
|
|||||||
based upon the input window which is either the source or
|
based upon the input window which is either the source or
|
||||||
disassembly window. */
|
disassembly window. */
|
||||||
enum tui_status
|
enum tui_status
|
||||||
tui_set_exec_info_content (struct tui_win_info * win_info)
|
tui_set_exec_info_content (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
enum tui_status ret = TUI_SUCCESS;
|
enum tui_status ret = TUI_SUCCESS;
|
||||||
|
|
||||||
if (win_info->detail.source_info.execution_info != (struct tui_gen_win_info *) NULL)
|
if (win_info->detail.source_info.execution_info != (struct tui_gen_win_info *) NULL)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * exec_info_ptr = win_info->detail.source_info.execution_info;
|
struct tui_gen_win_info *exec_info_ptr = win_info->detail.source_info.execution_info;
|
||||||
|
|
||||||
if (exec_info_ptr->content == NULL)
|
if (exec_info_ptr->content == NULL)
|
||||||
exec_info_ptr->content =
|
exec_info_ptr->content =
|
||||||
@ -480,8 +480,8 @@ tui_set_exec_info_content (struct tui_win_info * win_info)
|
|||||||
tui_update_breakpoint_info (win_info, 1);
|
tui_update_breakpoint_info (win_info, 1);
|
||||||
for (i = 0; i < win_info->generic.content_size; i++)
|
for (i = 0; i < win_info->generic.content_size; i++)
|
||||||
{
|
{
|
||||||
struct tui_win_element * element;
|
struct tui_win_element *element;
|
||||||
struct tui_win_element * src_element;
|
struct tui_win_element *src_element;
|
||||||
int mode;
|
int mode;
|
||||||
|
|
||||||
element = (struct tui_win_element *) exec_info_ptr->content[i];
|
element = (struct tui_win_element *) exec_info_ptr->content[i];
|
||||||
@ -520,9 +520,9 @@ tui_set_exec_info_content (struct tui_win_info * win_info)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_show_exec_info_content (struct tui_win_info * win_info)
|
tui_show_exec_info_content (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * exec_info = win_info->detail.source_info.execution_info;
|
struct tui_gen_win_info *exec_info = win_info->detail.source_info.execution_info;
|
||||||
int cur_line;
|
int cur_line;
|
||||||
|
|
||||||
werase (exec_info->handle);
|
werase (exec_info->handle);
|
||||||
@ -539,16 +539,16 @@ tui_show_exec_info_content (struct tui_win_info * win_info)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_erase_exec_info_content (struct tui_win_info * win_info)
|
tui_erase_exec_info_content (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
struct tui_gen_win_info * exec_info = win_info->detail.source_info.execution_info;
|
struct tui_gen_win_info *exec_info = win_info->detail.source_info.execution_info;
|
||||||
|
|
||||||
werase (exec_info->handle);
|
werase (exec_info->handle);
|
||||||
tui_refresh_win (exec_info);
|
tui_refresh_win (exec_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tui_clear_exec_info_content (struct tui_win_info * win_info)
|
tui_clear_exec_info_content (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
win_info->detail.source_info.execution_info->content_in_use = FALSE;
|
win_info->detail.source_info.execution_info->content_in_use = FALSE;
|
||||||
tui_erase_exec_info_content (win_info);
|
tui_erase_exec_info_content (win_info);
|
||||||
@ -558,7 +558,7 @@ tui_clear_exec_info_content (struct tui_win_info * win_info)
|
|||||||
|
|
||||||
/* Function to update the execution info window. */
|
/* Function to update the execution info window. */
|
||||||
void
|
void
|
||||||
tui_update_exec_info (struct tui_win_info * win_info)
|
tui_update_exec_info (struct tui_win_info *win_info)
|
||||||
{
|
{
|
||||||
tui_set_exec_info_content (win_info);
|
tui_set_exec_info_content (win_info);
|
||||||
tui_show_exec_info_content (win_info);
|
tui_show_exec_info_content (win_info);
|
||||||
@ -609,7 +609,7 @@ tui_alloc_source_buffer (struct tui_win_info *win_info)
|
|||||||
/* Answer whether the a particular line number or address is displayed
|
/* Answer whether the a particular line number or address is displayed
|
||||||
in the current source window. */
|
in the current source window. */
|
||||||
int
|
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 check_threshold)
|
||||||
{
|
{
|
||||||
int is_displayed = FALSE;
|
int is_displayed = FALSE;
|
||||||
@ -638,7 +638,7 @@ tui_line_is_displayed (int line, struct tui_win_info * win_info,
|
|||||||
/* Answer whether the a particular line number or address is displayed
|
/* Answer whether the a particular line number or address is displayed
|
||||||
in the current source window. */
|
in the current source window. */
|
||||||
int
|
int
|
||||||
tui_addr_is_displayed (CORE_ADDR addr, struct tui_win_info * win_info,
|
tui_addr_is_displayed (CORE_ADDR addr, struct tui_win_info *win_info,
|
||||||
int check_threshold)
|
int check_threshold)
|
||||||
{
|
{
|
||||||
int is_displayed = FALSE;
|
int is_displayed = FALSE;
|
||||||
|
@ -37,7 +37,7 @@ extern void tui_update_all_breakpoint_info (void);
|
|||||||
/* Scan the source window and the breakpoints to update the hasBreak
|
/* Scan the source window and the breakpoints to update the hasBreak
|
||||||
information for each line. Returns 1 if something changed and the
|
information for each line. Returns 1 if something changed and the
|
||||||
execution window must be refreshed. */
|
execution window must be refreshed. */
|
||||||
extern int tui_update_breakpoint_info (struct tui_win_info * win,
|
extern int tui_update_breakpoint_info (struct tui_win_info *win,
|
||||||
int current_only);
|
int current_only);
|
||||||
|
|
||||||
/* Function to display the "main" routine. */
|
/* Function to display the "main" routine. */
|
||||||
|
@ -67,7 +67,7 @@ enum tui_key_mode tui_current_key_mode = TUI_COMMAND_MODE;
|
|||||||
struct tui_char_command
|
struct tui_char_command
|
||||||
{
|
{
|
||||||
unsigned char key;
|
unsigned char key;
|
||||||
const char* cmd;
|
const char *cmd;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Key mapping to gdb commands when the TUI is using the single key mode. */
|
/* Key mapping to gdb commands when the TUI is using the single key mode. */
|
||||||
@ -211,7 +211,7 @@ tui_rl_delete_other_windows (int notused1, int notused2)
|
|||||||
static int
|
static int
|
||||||
tui_rl_other_window (int count, int key)
|
tui_rl_other_window (int count, int key)
|
||||||
{
|
{
|
||||||
struct tui_win_info * win_info;
|
struct tui_win_info *win_info;
|
||||||
|
|
||||||
if (!tui_active)
|
if (!tui_active)
|
||||||
tui_rl_switch_mode (0/*notused*/, 0/*notused*/);
|
tui_rl_switch_mode (0/*notused*/, 0/*notused*/);
|
||||||
@ -241,7 +241,7 @@ tui_rl_command_key (int count, int key)
|
|||||||
{
|
{
|
||||||
/* Must save the command because it can be modified
|
/* Must save the command because it can be modified
|
||||||
by execute_command. */
|
by execute_command. */
|
||||||
char* cmd = alloca (strlen (tui_commands[i].cmd) + 1);
|
char *cmd = alloca (strlen (tui_commands[i].cmd) + 1);
|
||||||
strcpy (cmd, tui_commands[i].cmd);
|
strcpy (cmd, tui_commands[i].cmd);
|
||||||
execute_command (cmd, TRUE);
|
execute_command (cmd, TRUE);
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user