2010-05-17 Michael Snyder <msnyder@vmware.com>

* tui/tui.c: White space.
	* tui/tui-data.c: White space.
	* tui/tui-disasm.c: White space.
	* tui/tui-file.c: White space.
	* tui/tui-interp.c: White space.
	* tui/tui-main.c: White space.
	* tui/tui-out.c: White space.
	* tui/tui-regs.c: White space.
	* tui/tui-source.c: White space.
	* tui/tui-stack.c: White space.
	* tui/tui-win.c: White space.
	* tui/tui-winsource.c: White space.
This commit is contained in:
Michael Snyder 2010-05-17 22:21:43 +00:00
parent f4a14ae60d
commit 1c5313c5c8
13 changed files with 46 additions and 4 deletions

View File

@ -1,5 +1,18 @@
2010-05-17 Michael Snyder <msnyder@vmware.com>
* tui/tui.c: White space.
* tui/tui-data.c: White space.
* tui/tui-disasm.c: White space.
* tui/tui-file.c: White space.
* tui/tui-interp.c: White space.
* tui/tui-main.c: White space.
* tui/tui-out.c: White space.
* tui/tui-regs.c: White space.
* tui/tui-source.c: White space.
* tui/tui-stack.c: White space.
* tui/tui-win.c: White space.
* tui/tui-winsource.c: White space.
* procfs.c: White space.
* python/py-auto-load.c: White space.

View File

@ -402,6 +402,7 @@ tui_partial_win_by_name (char *name)
if (tui_win_list[i] != 0)
{
char *cur_name = tui_win_name (&tui_win_list[i]->generic);
if (strlen (name) <= strlen (cur_name)
&& strncmp (name, cur_name, strlen (name)) == 0)
win_info = tui_win_list[i];

View File

@ -214,6 +214,7 @@ tui_set_disassem_content (struct gdbarch *gdbarch, CORE_ADDR pc)
for (i = 0; i < max_lines; i++)
{
size_t len = strlen (asm_lines[i].addr_string);
if (len > addr_size)
addr_size = len;

View File

@ -60,6 +60,7 @@ tui_file_new (void)
{
struct tui_stream *tui = XMALLOC (struct tui_stream);
struct ui_file *file = ui_file_new ();
set_ui_file_data (file, tui, tui_file_delete);
set_ui_file_flush (file, tui_file_flush);
set_ui_file_fputs (file, tui_file_fputs);
@ -74,6 +75,7 @@ static void
tui_file_delete (struct ui_file *file)
{
struct tui_stream *tmpstream = ui_file_data (file);
if (tmpstream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
_("tui_file_delete: bad magic number"));
@ -90,6 +92,7 @@ tui_fileopen (FILE *stream)
{
struct ui_file *file = tui_file_new ();
struct tui_stream *tmpstream = ui_file_data (file);
tmpstream->ts_streamtype = afile;
tmpstream->ts_filestream = stream;
tmpstream->ts_strbuf = NULL;
@ -102,6 +105,7 @@ tui_sfileopen (int n)
{
struct ui_file *file = tui_file_new ();
struct tui_stream *tmpstream = ui_file_data (file);
tmpstream->ts_streamtype = astring;
tmpstream->ts_filestream = NULL;
if (n > 0)
@ -121,6 +125,7 @@ static int
tui_file_isatty (struct ui_file *file)
{
struct tui_stream *stream = ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
_("tui_file_isatty: bad magic number"));
@ -134,6 +139,7 @@ static void
tui_file_rewind (struct ui_file *file)
{
struct tui_stream *stream = ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
_("tui_file_rewind: bad magic number"));
@ -146,6 +152,7 @@ tui_file_put (struct ui_file *file,
void *dest)
{
struct tui_stream *stream = ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
_("tui_file_put: bad magic number"));
@ -182,6 +189,7 @@ char *
tui_file_get_strbuf (struct ui_file *file)
{
struct tui_stream *stream = ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
_("tui_file_get_strbuf: bad magic number"));
@ -196,6 +204,7 @@ tui_file_adjust_strbuf (int n, struct ui_file *file)
{
struct tui_stream *stream = ui_file_data (file);
int non_null_chars;
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
_("tui_file_adjust_strbuf: bad magic number"));
@ -223,6 +232,7 @@ static void
tui_file_flush (struct ui_file *file)
{
struct tui_stream *stream = ui_file_data (file);
if (stream->ts_magic != &tui_file_magic)
internal_error (__FILE__, __LINE__,
_("tui_file_flush: bad magic number"));

View File

@ -169,6 +169,7 @@ tui_command_loop (void *data)
while (1)
{
int result = catch_errors (gdb_do_one_event, 0, "", RETURN_MASK_ALL);
if (result < 0)
break;

View File

@ -27,6 +27,7 @@ int
main (int argc, char **argv)
{
struct captured_main_args args;
memset (&args, 0, sizeof args);
args.argc = argc;
args.argv = argv;

View File

@ -53,6 +53,7 @@ tui_field_int (struct ui_out *uiout,
int value)
{
tui_out_data *data = ui_out_data (uiout);
if (data->base.suppress_output)
return;
@ -80,6 +81,7 @@ tui_field_string (struct ui_out *uiout,
const char *string)
{
tui_out_data *data = ui_out_data (uiout);
if (data->base.suppress_output)
return;
@ -110,6 +112,7 @@ tui_field_fmt (struct ui_out *uiout, int fldno,
va_list args)
{
tui_out_data *data = ui_out_data (uiout);
if (data->base.suppress_output)
return;
@ -124,6 +127,7 @@ static void
tui_text (struct ui_out *uiout, const char *string)
{
tui_out_data *data = ui_out_data (uiout);
if (data->base.suppress_output)
return;
data->start_of_line ++;
@ -166,7 +170,7 @@ extern void _initialize_tui_out (void);
void
_initialize_tui_out (void)
{
/* Inherit the CLI version. */
/* Inherit the CLI version. */
tui_ui_out_impl = cli_ui_out_impl;
/* Override a few methods. */

View File

@ -743,8 +743,8 @@ tui_get_register (struct frame_info *frame,
if (target_has_registers)
{
gdb_byte buf[MAX_REGISTER_SIZE];
get_frame_register (frame, regnum, buf);
get_frame_register (frame, regnum, buf);
if (changedp)
{
struct gdbarch *gdbarch = get_frame_arch (frame);

View File

@ -64,6 +64,7 @@ tui_set_source_content (struct symtab *s,
if (!noerror)
{
char *name = alloca (strlen (s->filename) + 100);
sprintf (name, "%s:%d", s->filename, line_no);
print_sys_errmsg (name, errno);
}
@ -116,7 +117,7 @@ tui_set_source_content (struct symtab *s,
while (cur_line < nlines)
{
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. */
c = fgetc (stream);
@ -263,6 +264,7 @@ tui_set_source_content_nil (struct tui_win_info *win_info,
struct tui_win_element *element =
(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.u.line_no = 0;
element->which_element.source.is_exec_point = FALSE;

View File

@ -355,6 +355,7 @@ tui_show_frame_info (struct frame_info *fi)
for (i = 0; i < (tui_source_windows ())->count; i++)
{
union tui_which_element *item;
win_info = (tui_source_windows ())->list[i];
item = &((struct tui_win_element *) locator->content[0])->which_element;
@ -378,6 +379,7 @@ tui_show_frame_info (struct frame_info *fi)
if (win_info == TUI_SRC_WIN)
{
struct tui_line_or_address l;
l.loa = LOA_LINE;
l.u.line_no = start_line;
if (!(source_already_displayed
@ -395,6 +397,7 @@ tui_show_frame_info (struct frame_info *fi)
if (win_info == TUI_DISASM_WIN)
{
struct tui_line_or_address a;
a.loa = LOA_ADDRESS;
a.u.addr = low;
if (!tui_addr_is_displayed (item->locator.addr, win_info, TRUE))

View File

@ -827,6 +827,7 @@ tui_initialize_win (void)
#ifdef SIGWINCH
#ifdef HAVE_SIGACTION
struct sigaction old_winch;
memset (&old_winch, 0, sizeof (old_winch));
old_winch.sa_handler = &tui_sigwinch_handler;
sigaction (SIGWINCH, &old_winch, NULL);
@ -1241,6 +1242,7 @@ tui_adjust_win_heights (struct tui_win_info *primary_win_info,
if ((TUI_CMD_WIN->generic.height + diff) < 1)
{
int i;
for (i = TUI_CMD_WIN->generic.height + diff;
(i < 1); i++)
if (primary_win_info == first_win)

View File

@ -221,7 +221,8 @@ tui_clear_source_content (struct tui_win_info *win_info,
for (i = 0; i < win_info->generic.content_size; i++)
{
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.is_exec_point = FALSE;
}
@ -328,6 +329,7 @@ tui_horizontal_source_scroll (struct tui_win_info *win_info,
if (win_info->generic.type == SRC_WIN)
{
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (cursal.symtab == NULL)
s = find_pc_symtab (get_frame_pc (get_selected_frame (NULL)));
else

View File

@ -244,6 +244,7 @@ tui_rl_command_key (int count, int key)
/* Must save the command because it can be modified by
execute_command. */
char *cmd = alloca (strlen (tui_commands[i].cmd) + 1);
strcpy (cmd, tui_commands[i].cmd);
execute_command (cmd, TRUE);
return 0;
@ -530,6 +531,7 @@ void
tui_show_source (const char *file, int line)
{
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
/* Make sure that the source window is displayed. */
tui_add_win_to_layout (SRC_WIN);