Make error usable earlier
error (and other exception-throwing functions) are callable from the first line of captured_main, but the exception printing code will crash if called before the first call to set_width. This commit makes the exception printing code usable from the moment gdb_stderr is set up. gdb/ChangeLog: * exceptions.c (print_flush): Protect calls to target_terminal_ours and wrap_here.
This commit is contained in:
parent
2437fd32f1
commit
5df4399815
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
@ -239,6 +239,8 @@ print_flush (void)
|
|||
|
||||
if (deprecated_error_begin_hook)
|
||||
deprecated_error_begin_hook ();
|
||||
|
||||
if (target_supports_terminal_ours ())
|
||||
target_terminal_ours ();
|
||||
|
||||
/* We want all output to appear now, before we print the error. We
|
||||
|
@ -247,6 +249,7 @@ print_flush (void)
|
|||
too): */
|
||||
|
||||
/* 1. The _filtered buffer. */
|
||||
if (filtered_printing_initialized ())
|
||||
wrap_here ("");
|
||||
|
||||
/* 2. The stdio buffer. */
|
||||
|
|
Loading…
Reference in New Issue