This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Libiberty demangling - new demangler - expected behaviour


I'm adding support from MSVC-style mangling to libiberty, mostly so that
objdump demangles imports/exports.

Before I go much further along this route, I just want to confirm that my
planned implementation works the way (most) people expect it to. Please let
me know if you disagree with my decisions.

The relevant options (from demangle.h) for cplus_demangle are:
#define DMGL_NO_OPTS     0              /* For readability... */
#define DMGL_PARAMS      (1 << 0)       /* Include function args */
#define DMGL_ANSI        (1 << 1)       /* Include const, volatile, etc */
#define DMGL_VERBOSE     (1 << 3)       /* Include implementation details.
#define DMGL_TYPES       (1 << 4)       /* Also try to demangle type
encodings.  */
#define DMGL_RET_POSTFIX (1 << 5)       /* Print function return types (when
                                           present) after function signature

Using the mangled symbol 
- ?CreateInstance@CTmProxyCore@@SGJPAPAV1@PAUIUnknown@@@Z
(from C:\WINDOWS\$hf_mig$\KB902400\SP2QFE\msdtcprx.dll)
the OS decoded version (UnDecorateSymbolName in DBGHLP.DLL) is
- public: static long __stdcall CTmProxyCore::CreateInstance(class
CTmProxyCore * *,struct IUnknown *)

So cplus_demangle output should be:

 CTmProxyCore::CreateInstance(class CTmProxyCore * *,struct IUnknown *)
 static CTmProxyCore::CreateInstance
 public: static __stdcall CTmProxyCore::CreateInstance
 long CTmProxyCore::CreateInstance
 CTmProxyCore::CreateInstance long


Phil Lello

P.S. I have returned my Copyright Assignment form, hopefully this should
arrive and be processed some time next week.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]