static int cli_interpreter_resume (void *data) { struct ui_file *stream; /* APPLE LOCAL: This is commented out in the FSF code. Maybe it doesn't work with the async remote or something? We need it. */ sync_execution = 1; print_frame_more_info_hook = 0; /* gdb_setup_readline will change gdb_stdout. If the CLI was previously writing to gdb_stdout, then set it to the new gdb_stdout afterwards. */ stream = cli_out_set_stream (cli_uiout, gdb_stdout); if (stream != gdb_stdout) { cli_out_set_stream (cli_uiout, stream); stream = NULL; } gdb_setup_readline (); if (stream != NULL) cli_out_set_stream (cli_uiout, gdb_stdout); return 1; }
static int tui_resume (void *data) { struct ui_file *stream; /* gdb_setup_readline will change gdb_stdout. If the TUI was previously writing to gdb_stdout, then set it to the new gdb_stdout afterwards. */ stream = cli_out_set_stream (tui_old_uiout, gdb_stdout); if (stream != gdb_stdout) { cli_out_set_stream (tui_old_uiout, stream); stream = NULL; } gdb_setup_readline (); if (stream != NULL) cli_out_set_stream (tui_old_uiout, gdb_stdout); if (tui_start_enabled) tui_enable (); return 1; }
static struct gdb_exception cli_interpreter_exec (void *data, const char *command_str) { struct ui_file *old_stream; struct gdb_exception result; /* FIXME: cagney/2003-02-01: Need to const char *propogate safe_execute_command. */ char *str = strcpy (alloca (strlen (command_str) + 1), command_str); /* gdb_stdout could change between the time cli_uiout was initialized and now. Since we're probably using a different interpreter which has a new ui_file for gdb_stdout, use that one instead of the default. It is important that it gets reset everytime, since the user could set gdb to use a different interpreter. */ old_stream = cli_out_set_stream (cli_uiout, gdb_stdout); result = safe_execute_command (cli_uiout, str, 1); cli_out_set_stream (cli_uiout, old_stream); return result; }
static int cli_interpreter_resume (void *data) { struct ui_file *stream; /*sync_execution = 1; */ /* gdb_setup_readline will change gdb_stdout. If the CLI was previously writing to gdb_stdout, then set it to the new gdb_stdout afterwards. */ stream = cli_out_set_stream (cli_uiout, gdb_stdout); if (stream != gdb_stdout) { cli_out_set_stream (cli_uiout, stream); stream = NULL; } gdb_setup_readline (); if (stream != NULL) cli_out_set_stream (cli_uiout, gdb_stdout); return 1; }