* 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.
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.
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];
for (i = 0; i < max_lines; i++)
{
size_t len = strlen (asm_lines[i].addr_string);
+
if (len > addr_size)
addr_size = len;
{
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);
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"));
{
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;
{
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)
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"));
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"));
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"));
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"));
{
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"));
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"));
while (1)
{
int result = catch_errors (gdb_do_one_event, 0, "", RETURN_MASK_ALL);
+
if (result < 0)
break;
main (int argc, char **argv)
{
struct captured_main_args args;
+
memset (&args, 0, sizeof args);
args.argc = argc;
args.argv = argv;
int value)
{
tui_out_data *data = ui_out_data (uiout);
+
if (data->base.suppress_output)
return;
const char *string)
{
tui_out_data *data = ui_out_data (uiout);
+
if (data->base.suppress_output)
return;
va_list args)
{
tui_out_data *data = ui_out_data (uiout);
+
if (data->base.suppress_output)
return;
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 ++;
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. */
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);
if (!noerror)
{
char *name = alloca (strlen (s->filename) + 100);
+
sprintf (name, "%s:%d", s->filename, line_no);
print_sys_errmsg (name, errno);
}
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);
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;
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;
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
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))
#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);
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)
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;
}
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
/* 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;
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);