GNU Binutils with patches for OS216
Révision | 3eac21af31c58495c39dad6a9d0c275b5e28b607 (tree) |
---|---|
l'heure | 2006-09-12 13:00:29 |
Auteur | Nick Roberts <nickrob@snap...> |
Commiter | Nick Roberts |
(cli_interpreter_exec): Revert to version in
mainline but return exception_none.
@@ -97,24 +97,22 @@ cli_interpreter_display_prompt_p (void *data) | ||
97 | 97 | static struct gdb_exception |
98 | 98 | cli_interpreter_exec (void *data, const char *command_str) |
99 | 99 | { |
100 | - struct gdb_exception result; | |
100 | + struct ui_file *old_stream; | |
101 | 101 | |
102 | 102 | /* FIXME: cagney/2003-02-01: Need to const char *propogate |
103 | 103 | safe_execute_command. */ |
104 | 104 | char *str = strcpy (alloca (strlen (command_str) + 1), command_str); |
105 | 105 | |
106 | - /* We don't need old_stream because we actually change the | |
107 | - interpreters when we do interpreter exec, then swap them back. | |
108 | - This code assumes that the interpreter is still the one that is | |
109 | - exec'ing in the cli interpreter, and we are just faking it up. */ | |
110 | - /* We want | |
111 | - the person who set the interpreter to get the uiout right for that | |
112 | - according to their lights. If you don't do that, then you can't share | |
113 | - the cli_interpreter_exec between the console-unquoted & console | |
114 | - interpreters. */ | |
115 | - result = safe_execute_command (uiout, str, 1); | |
116 | - | |
117 | - return result; | |
106 | + /* gdb_stdout could change between the time cli_uiout was initialized | |
107 | + and now. Since we're probably using a different interpreter which has | |
108 | + a new ui_file for gdb_stdout, use that one instead of the default. | |
109 | + | |
110 | + It is important that it gets reset everytime, since the user could | |
111 | + set gdb to use a different interpreter. */ | |
112 | + old_stream = cli_out_set_stream (cli_uiout, gdb_stdout); | |
113 | + safe_execute_command (cli_uiout, str, 1); | |
114 | + cli_out_set_stream (cli_uiout, old_stream); | |
115 | + return exception_none; | |
118 | 116 | } |
119 | 117 | |
120 | 118 | static void |