2010-12-28 Michael Snyder <msnyder@vmware.com>
* command.h: Comment clean-up. * cli/cli-cmds.c: Ditto. * cli/cli-cmds.h: Ditto. * cli/cli-decode.c: Ditto. * cli/cli-decode.h: Ditto. * cli/cli-dump.c: Ditto. * cli/cli-interp.c: Ditto. * cli/cli-logging.c: Ditto. * cli/cli-script.c: Ditto. * cli/cli-setshow.c: Ditto. * cli/cli-setshow.h: Ditto.
This commit is contained in:
parent
3458c4521e
commit
ebcd3b23ee
12 changed files with 321 additions and 279 deletions
|
@ -30,11 +30,13 @@
|
|||
|
||||
struct ui_out *cli_uiout;
|
||||
|
||||
/* These are the ui_out and the interpreter for the console interpreter. */
|
||||
/* These are the ui_out and the interpreter for the console
|
||||
interpreter. */
|
||||
|
||||
/* Longjmp-safe wrapper for "execute_command". */
|
||||
static struct gdb_exception safe_execute_command (struct ui_out *uiout,
|
||||
char *command, int from_tty);
|
||||
char *command,
|
||||
int from_tty);
|
||||
struct captured_execute_command_args
|
||||
{
|
||||
char *command;
|
||||
|
@ -56,8 +58,9 @@ cli_interpreter_resume (void *data)
|
|||
|
||||
/*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. */
|
||||
/* 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)
|
||||
|
@ -101,12 +104,13 @@ cli_interpreter_exec (void *data, const char *command_str)
|
|||
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.
|
||||
/* 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. */
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue