From: Pedro Alves Date: Fri, 10 Jan 2020 20:05:43 +0000 (+0000) Subject: exceptions.c:print_flush: Remove obsolete check X-Git-Url: http://git.efficios.com/?p=deliverable%2Fbinutils-gdb.git;a=commitdiff_plain;h=74375d182e992778ef8701278c02a742db6be77e exceptions.c:print_flush: Remove obsolete check Commit 20f0d60db4fb ("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 * exceptions.c (print_flush): Remove current_top_target() check. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index af46e69fb3..1100e42141 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-01-10 Pedro Alves + + * exceptions.c (print_flush): Remove current_top_target() check. + 2020-01-10 Pedro Alves * remote.c (show_remote_exec_file): Show the current inferior's diff --git a/gdb/exceptions.c b/gdb/exceptions.c index 587988ac80..52cee4e2f6 100644 --- a/gdb/exceptions.c +++ b/gdb/exceptions.c @@ -39,11 +39,7 @@ print_flush (void) deprecated_error_begin_hook (); gdb::optional term_state; - /* While normally there's always something pushed on the target - 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 ()) + if (target_supports_terminal_ours ()) { term_state.emplace (); target_terminal::ours_for_output ();