exceptions.c:print_flush: Remove obsolete check

Commit 20f0d60db4 ("Avoid crash when calling warning too early"),
added a "current_top_target () != NULL" check to
target_supports_terminal_ours, so this check in exceptions.c is now
obsolete.

gdb/ChangeLog:
2020-01-10  Pedro Alves  <palves@redhat.com>

	* exceptions.c (print_flush): Remove current_top_target() check.
This commit is contained in:
Pedro Alves 2020-01-10 20:05:43 +00:00
parent acdf84a654
commit 74375d182e
2 changed files with 5 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2020-01-10 Pedro Alves <palves@redhat.com>
* exceptions.c (print_flush): Remove current_top_target() check.
2020-01-10 Pedro Alves <palves@redhat.com> 2020-01-10 Pedro Alves <palves@redhat.com>
* remote.c (show_remote_exec_file): Show the current inferior's * remote.c (show_remote_exec_file): Show the current inferior's

View File

@ -39,11 +39,7 @@ print_flush (void)
deprecated_error_begin_hook (); deprecated_error_begin_hook ();
gdb::optional<target_terminal::scoped_restore_terminal_state> term_state; gdb::optional<target_terminal::scoped_restore_terminal_state> term_state;
/* While normally there's always something pushed on the target if (target_supports_terminal_ours ())
stack, the NULL check is needed here because we can get here very
early during startup, before the target stack is first
initialized. */
if (current_top_target () != NULL && target_supports_terminal_ours ())
{ {
term_state.emplace (); term_state.emplace ();
target_terminal::ours_for_output (); target_terminal::ours_for_output ();