From a402c1e54f92f42f2e0690ca182e8320c520dd5d Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 9 Nov 2016 15:04:29 +0000 Subject: [PATCH] c++filt: flush output after newline Some tools spawn c++filt and pass it a single line at a time for demangling. This is akin to r276689 for addr2line. Sponsored by: The FreeBSD Foundation --- contrib/elftoolchain/cxxfilt/cxxfilt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/elftoolchain/cxxfilt/cxxfilt.c b/contrib/elftoolchain/cxxfilt/cxxfilt.c index c6d737a05267..f471a5a7f552 100644 --- a/contrib/elftoolchain/cxxfilt/cxxfilt.c +++ b/contrib/elftoolchain/cxxfilt/cxxfilt.c @@ -188,6 +188,8 @@ main(int argc, char **argv) if (c == EOF) break; putchar(c); + if (c == '\n') + fflush(stdout); } else { if ((size_t) p >= sizeof(buf) - 1) warnx("buffer overflowed");