/* Command-line output logging for GDB, the GNU debugger.
- Copyright (C) 2003-2015 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This file is part of GDB.
neither of it. At least do not try to push OUTPUT if the pop
already failed. */
- if (ui_out_redirect (uiout, NULL) < 0
- || ui_out_redirect (uiout, output) < 0)
+ if (uiout->redirect (NULL) < 0
+ || uiout->redirect (output) < 0)
warning (_("Current output protocol does not support redirection"));
do_cleanups (cleanups);
saved_output.targ = NULL;
saved_output.targerr = NULL;
- ui_out_redirect (current_uiout, NULL);
+ /* Stay consistent with handle_redirections. */
+ if (!current_uiout->is_mi_like_p ())
+ current_uiout->redirect (NULL);
}
/* This is a helper for the `set logging' command. */
}
/* Don't do the redirect for MI, it confuses MI's ui-out scheme. */
- if (!ui_out_is_mi_like_p (current_uiout))
+ if (!current_uiout->is_mi_like_p ())
{
- if (ui_out_redirect (current_uiout, output) < 0)
+ if (current_uiout->redirect (output) < 0)
warning (_("Current output protocol does not support redirection"));
}
}