diff options
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r-- | gdb/python/python.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 84f0596..e467134 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -658,10 +658,17 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) /* Copy the argument text in case the command modifies it. */ char *copy = xstrdup (arg); struct cleanup *cleanup = make_cleanup (xfree, copy); + struct interp *interp; make_cleanup_restore_integer (&interpreter_async); interpreter_async = 0; + make_cleanup_restore_ui_out (¤t_uiout); + /* Use the console interpreter uiout to have the same print format + for console or MI. */ + interp = interp_lookup ("console"); + current_uiout = interp_ui_out (interp); + prevent_dont_repeat (); if (to_string) result = execute_command_to_string (copy, from_tty); |