aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ui-file.c')
-rw-r--r--gdb/ui-file.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
index a7ecde4..02a0314 100644
--- a/gdb/ui-file.c
+++ b/gdb/ui-file.c
@@ -481,7 +481,9 @@ stdio_file_write (struct ui_file *file, const char *buf, long length_buf)
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
_("stdio_file_write: bad magic number"));
- fwrite (buf, length_buf, 1, stdio->file);
+ /* Calling error crashes when we are called from the exception framework. */
+ if (fwrite (buf, length_buf, 1, stdio->file))
+ ;
}
static void
@@ -491,7 +493,9 @@ stdio_file_fputs (const char *linebuffer, struct ui_file *file)
if (stdio->magic != &stdio_file_magic)
internal_error (__FILE__, __LINE__,
_("stdio_file_fputs: bad magic number"));
- fputs (linebuffer, stdio->file);
+ /* Calling error crashes when we are called from the exception framework. */
+ if (fputs (linebuffer, stdio->file))
+ ;
}
static int