diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/exceptions.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1a086ca..8504cb9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2014-08-29 Gary Benson <gbenson@redhat.com> + * exceptions.c (print_flush): Protect calls to + target_terminal_ours and wrap_here. + +2014-08-29 Gary Benson <gbenson@redhat.com> + * utils.h (filtered_printing_initialized): New declaration. * utils.c (abort_with_message): New function. (internal_vproblem): Use abort_with_message for first level diff --git a/gdb/exceptions.c b/gdb/exceptions.c index 38e966c..063d2b1 100644 --- a/gdb/exceptions.c +++ b/gdb/exceptions.c @@ -239,7 +239,9 @@ print_flush (void) if (deprecated_error_begin_hook) deprecated_error_begin_hook (); - target_terminal_ours (); + + if (target_supports_terminal_ours ()) + target_terminal_ours (); /* We want all output to appear now, before we print the error. We have 3 levels of buffering we have to flush (it's possible that @@ -247,7 +249,8 @@ print_flush (void) too): */ /* 1. The _filtered buffer. */ - wrap_here (""); + if (filtered_printing_initialized ()) + wrap_here (""); /* 2. The stdio buffer. */ gdb_flush (gdb_stdout); |