Fangqing Du via llvm-dev
2018-Mar-16 18:15 UTC
[llvm-dev] How to get c++ function demangled name without parameters.
Hi all, We know that 'ItaniumDemangle' has been added into llvm lib to resolve demangling related issues. And if we dump mangled function name '_Z3duti' into 'char *llvm::itaniumDemangle(const char *mangled_name, char *buf, size_t *n, int *status)', we will get 'dut(int)'. So my question is: How can I just get the function name 'dut' without parameters, like '(int)', in above case? (We know that there is a GNU project, named libiberty, which can provide several different demangling types through a demangling option. However, libiberty is an old c lib. So do we have any replacement?) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180316/72c2d1a7/attachment.html>
Erik Pilkington via llvm-dev
2018-Mar-16 19:27 UTC
[llvm-dev] How to get c++ function demangled name without parameters.
Hi Fangqing, llvm::itaniumDemangle() doesn't yet provide this functionality, but I'm working on adding it in now for the LLDB folks (http://lists.llvm.org/pipermail/lldb-dev/2018-January/013186.html). I should have a patch up Very Soon! If you would like I can CC you to it. Thanks, Erik On 2018-03-16 2:15 PM, Fangqing Du via llvm-dev wrote:> Hi all, > > We know that 'ItaniumDemangle' has been added into llvm lib to resolve > demangling related issues. > > And if we dump mangled function name '_Z3duti' into 'char > *llvm::itaniumDemangle(const char *mangled_name, char *buf, size_t *n, > int *status)', we will get 'dut(int)'. > > So my question is: > How can I just get the function name 'dut' without parameters, like > '(int)', in above case? > > (We know that there is a GNU project, named libiberty, which can > provide several different demangling types through a demangling > option. However, libiberty is an old c lib. So do we have any > replacement?) > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180316/d6561839/attachment.html>
Fangqing Du via llvm-dev
2018-Mar-16 19:49 UTC
[llvm-dev] How to get c++ function demangled name without parameters.
Hi Erik, It would be great to have it soon! CC me please. Thanks a lot! Fangqing 2018-03-16 12:27 GMT-07:00 Erik Pilkington <erik.pilkington at gmail.com>:> Hi Fangqing, > llvm::itaniumDemangle() doesn't yet provide this functionality, but I'm > working on adding it in now for the LLDB folks (http://lists.llvm.org/ > pipermail/lldb-dev/2018-January/013186.html). I should have a patch up > Very Soon! If you would like I can CC you to it. > Thanks, > Erik > > > On 2018-03-16 2:15 PM, Fangqing Du via llvm-dev wrote: > > Hi all, > > We know that 'ItaniumDemangle' has been added into llvm lib to resolve > demangling related issues. > > And if we dump mangled function name '_Z3duti' into 'char > *llvm::itaniumDemangle(const char *mangled_name, char *buf, size_t *n, int > *status)', we will get 'dut(int)'. > > So my question is: > How can I just get the function name 'dut' without parameters, like > '(int)', in above case? > > (We know that there is a GNU project, named libiberty, which can provide > several different demangling types through a demangling option. However, > libiberty is an old c lib. So do we have any replacement?) > > > _______________________________________________ > LLVM Developers mailing listllvm-dev at lists.llvm.orghttp://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180316/0d0f29c2/attachment.html>
Reasonably Related Threads
- How to get c++ function demangled name without parameters.
- RFC: Cleaning up the Itanium demangler
- [lldb-dev] RFC: Cleaning up the Itanium demangler
- RFC: Cleaning up the Itanium demangler
- [cfe-dev] Emiting linkage names for Types to Debuginfo (C++ RTTI support in GDB/LLDB)