Use ui_out_redirect_pop in more places
This changes ui_out_redirect_pop to also perform the redirection, and then updates several sites to use this, rather than explicit redirects.
This commit is contained in:
parent
55a6603404
commit
992aeed80b
7 changed files with 18 additions and 43 deletions
|
@ -548,19 +548,17 @@ bppy_get_commands (PyObject *self, void *closure)
|
|||
|
||||
string_file stb;
|
||||
|
||||
current_uiout->redirect (&stb);
|
||||
try
|
||||
{
|
||||
ui_out_redirect_pop redir (current_uiout, &stb);
|
||||
print_command_lines (current_uiout, breakpoint_commands (bp), 0);
|
||||
}
|
||||
catch (const gdb_exception &except)
|
||||
{
|
||||
current_uiout->redirect (NULL);
|
||||
gdbpy_convert_exception (except);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
current_uiout->redirect (NULL);
|
||||
return host_string_to_python_string (stb.c_str ()).release ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue