This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
c++filt lossage to gcj 4.0.x
- From: Andrew Haley <aph at redhat dot com>
- To: binutils at sourceware dot org
- Date: Thu, 17 Nov 2005 12:31:03 +0000
- Subject: c++filt lossage to gcj 4.0.x
This patch:
PR binutils/1437
* cxxfilt.c (flags): Remove DMGL_TYPES;
(long_options): Rename --no-types to --types.
(usage): Likewise.
(demangle_it): Add a comment describing why _ and $ prefixes are skipped.
Use printf rather than puts to emit the demangled output in order to avoid
emitting a new line character.
(main): Have the -t flag enable type demangling.
Emit a newline after every demangled command line argument.
Copy whitespace from stdin to stdout.
removed a critical fflush() from c++filt. As a result gcj 4.0.x no
longer works on any system with current binutils.
You can read the whole sorry saga at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=339287.
This patch restores the previous binutils behaviour.
Andrew.
2005-11-17 Andrew Haley <aph@redhat.com>
* cxxfilt.c (main): Flush ouput at newline.
Index: cxxfilt.c
===================================================================
RCS file: /cvs/src/src/binutils/cxxfilt.c,v
retrieving revision 1.10
diff -u -r1.10 cxxfilt.c
--- cxxfilt.c 11 Oct 2005 16:33:16 -0000 1.10
+++ cxxfilt.c 17 Nov 2005 12:29:26 -0000
@@ -278,8 +278,9 @@
/* Echo the whitespace characters so that the output looks
like the input, only with the mangled names demangled. */
putchar (c);
+ if (c == '\n')
+ fflush (stdout);
}
- fflush (stdout);
return 0;
}