PATCH: Fix demangler in symbol versioning
Carlo Wood
carlo@alinoe.com
Fri Dec 5 02:52:00 GMT 2003
More information about the Binutils mailing list
Fri Dec 5 02:52:00 GMT 2003
- Previous message (by thread): PATCH: Fix demangler in symbol versioning
- Next message (by thread): PATCH: Fix demangler in symbol versioning
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Dec 04, 2003 at 08:04:01PM -0500, Ian Lance Taylor wrote: > "H. J. Lu" <hjl@lucon.org> writes: > > > > It could conceivably lead to incorrect output. I don't know. For > > > example, if you call cplus_demangle ("i", DMGL_TYPES), you will get > > > "int". So if there is an external variable named `i', it seems > > > conceivable that the wrong thing would happen. I haven't thought > > > about whether this could really happen, though. > > > > In that case, we have a regression with cxxfilt. The old one: > > > > # cxxfilt i > > i > > > > The new one: > > > > # ./cxxfilt i > > int > > What is ``the old one'' in this case? > > I think a c++filt built from any sources in 2003 will print `int' when > passed `i'. Certainly I have one which does that. The correct behaviour is to print 'i'. Documentation of __cxa_demangle: // Ambiguities are possible between extern "C" object names and // internal built-in type names, e.g. "i" may be either an object // named "i" or the built-in "int" type. Such ambiguities should // be resolved to user names over built-in names. Builtin types // are any single lower case character. Any other single // character is not a mangled type so we can treat those the same // here. In other words, any single character input to c++filt should print 'i' if you call __cxa_demangle(). -- Carlo Wood <carlo@alinoe.com>
- Previous message (by thread): PATCH: Fix demangler in symbol versioning
- Next message (by thread): PATCH: Fix demangler in symbol versioning
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list