Operating System - HP-UX
1828631 Members
3863 Online
109983 Solutions
New Discussion

extracting undecorated function name

 
SOLVED
Go to solution
Wkdunreal
Advisor

extracting undecorated function name

Hi,

Is there any way to extract readable function names (undecorated names) from decorated names in C++.

I am trying to capture original function names to create a log.

I am using HP UX 11.31
for example:

function name:CBasicStack
decorated name: _ZN11CBasicStackC1Ev

Is there any way i can capture CBasicStack from this decorated name?

Thanks in Advance
Regards
3 REPLIES 3
Dennis Handly
Acclaimed Contributor
Solution

Re: extracting undecorated function name

You can use the filter c++filt to demangle stdin or command line values.
If you want to do it programmatically, you can call __cxa_demangle.
Wkdunreal
Advisor

Re: extracting undecorated function name

Awesome!
Thanks helped a lot!

Thanks Dennis :):)
Dennis Handly
Acclaimed Contributor

Re: extracting undecorated function name

>Thanks helped a lot!

If you are happy with your answers, please read the following about assigning points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33