aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-01-14 12:35:56 +0000
committerAlan Modra <amodra@gmail.com>2011-01-14 12:35:56 +0000
commit4a97a0e54cba4caa5d994260f9c8ac9548628790 (patch)
tree5802880b8d0542816b00b72493804567ae7d3c92 /bfd/bfd.c
parent82e96e07e5c45073273535cfe3ca665091199033 (diff)
downloadgdb-4a97a0e54cba4caa5d994260f9c8ac9548628790.zip
gdb-4a97a0e54cba4caa5d994260f9c8ac9548628790.tar.gz
gdb-4a97a0e54cba4caa5d994260f9c8ac9548628790.tar.bz2
* bfd.c (bfd_perror): Flush stdout before and stderr after printing
error. (_bfd_default_error_handler): Likewise. * elf.c (print_segment_map): Likewise. * libbfd.c (warn_deprecated): Likewise. * som.c (som_sizeof_headers): No need to do so here. * coff-i860.c: Replace use of printf for error messages with _bfd_error_handler. * coff-ppc.c: Likewise. * coff-sh.c: Likewise. * elf32-bfin.c: Likewise. * elf32-dlx.c: Likewise. * elf32-mep.c: Likewise. * elf32-v850.c: Likewise. * mach-o.c: Likewise. * pef.c: Likewise.
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index a9ce7cc..77582ec 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1,6 +1,6 @@
/* Generic BFD library interface and support routines.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -523,10 +523,12 @@ DESCRIPTION
void
bfd_perror (const char *message)
{
+ fflush (stdout);
if (message == NULL || *message == '\0')
fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ()));
else
fprintf (stderr, "%s: %s\n", message, bfd_errmsg (bfd_get_error ()));
+ fflush (stderr);
}
/*
@@ -723,6 +725,7 @@ _bfd_default_error_handler (const char *fmt, ...)
va_end (ap);
putc ('\n', stderr);
+ fflush (stderr);
}
/* This is a function pointer to the routine which should handle BFD