search for: __cxa_demangle

Displaying 20 results from an estimated 38 matches for "__cxa_demangle".

2014 Apr 02
5
[LLVMdev] [lld] adding demangler for symbol resolution
...wrap a demangle() call around every use. Are you mentioning that one demangle function in LinkingContext ? One demangle method wouldnt work as the ItaniumABI uses one method to demangle, ARMCXXABI uses a different method, and MSVC uses a different one. I am not sure about Mach-O here ? > The __cxa_demangle function has an odd interface that requires a malloc allocated block. Having demangle() return a std::string means yet another allocation. We might not care if this is just used in diagnostic outputs, but a more efficient way would be to pass the stream object to demangle and have it write directl...
2016 May 05
3
RFC: Adding an itanium c++ demangler to lib/Support
...ntirely by Howard during his time as an Apple employee so can likely be relicensed with Chris’s permission if required. > >> * How much llvm-like should we try to make it? Should it take an >> StringRef, return an Error and print to a raw_ostream? Or should it >> look more like __cxa_demangle to try to make it easier to move code >> in? > > I believe that it should be a generally useful demangler. __cxa_demangle has a very poorly designed interface and is really only useful for turning mangled names into strings. The earlier one makes it easy, for example, to extract the d...
2016 May 05
4
RFC: Adding an itanium c++ demangler to lib/Support
...in lib/Support something people find desirable or at least acceptable? * The libcxxabi code is dual licensed, would the copy in lib/Support be as well? * How much llvm-like should we try to make it? Should it take an StringRef, return an Error and print to a raw_ostream? Or should it look more like __cxa_demangle to try to make it easier to move code in? My current preference is probably to make it as llvm-like as possible since I don't expect we will need to add new mangling features too often. Cheers, Rafael
2018 Mar 06
0
Emiting linkage names for Types to Debuginfo (C++ RTTI support in GDB/LLDB)
On Tue, Mar 6, 2018 at 9:20 AM, Roman Popov <ripopov at gmail.com> wrote: > I wonder if abi::__cxa_demangle guarantees unambigous names? >>> >> >> No, it does not. >> > > Interesting. Can you give an example of type where it fails? > I can't construct one out of thin air, but i believe someone cited one to you on the gdb mailing list. It's entirely possible f...
2015 Mar 02
2
[LLVMdev] clang change function name
...r mangle the original > name or demangle the name you're seeing in the LLVM bitcode. > > As an FYI, on Unix, the c++filt program will demangle names (although > sometimes you have to remove an extra '_' from the front of the name to get > it to work). there's also a __cxa_demangle function in http://llvm.org/svn/llvm-project/libcxxabi/trunk/include/cxxabi.h
2012 Aug 15
2
[LLVMdev] C++ demangling in LLVM
...here any resolution about if bringing this into the LLVM Support directory should be done or not? I have a need of being able to use this, not just for demangling, but also to verify correctness of a mangled function, and can only rely on LLVM core. Micah, Why can't you just call the standard __cxa_demangle function? -Chris
2018 Mar 06
1
Emiting linkage names for Types to Debuginfo (C++ RTTI support in GDB/LLDB)
On Tue, Mar 6, 2018 at 9:49 AM Daniel Berlin <dberlin at dberlin.org> wrote: > On Tue, Mar 6, 2018 at 9:20 AM, Roman Popov <ripopov at gmail.com> wrote: > >> I wonder if abi::__cxa_demangle guarantees unambigous names? >>>> >>> >>> No, it does not. >>> >> >> Interesting. Can you give an example of type where it fails? >> > > I can't construct one out of thin air, but i believe someone cited one to > you on the gdb m...
2018 Mar 06
2
Emiting linkage names for Types to Debuginfo (C++ RTTI support in GDB/LLDB)
> > I wonder if abi::__cxa_demangle guarantees unambigous names? >> > > No, it does not. > Interesting. Can you give an example of type where it fails? I'm currently working on hardware construction library for C++ (similar to Chisel (which is written in Scala)). And since C++ has no standardized reflection, I use...
2016 May 05
3
RFC: Adding an itanium c++ demangler to lib/Support
...pple employee so can > likely be relicensed with Chris’s permission if required. > >> > >>> * How much llvm-like should we try to make it? Should it take an > >>> StringRef, return an Error and print to a raw_ostream? Or should it > >>> look more like __cxa_demangle to try to make it easier to move code > >>> in? > >> > >> I believe that it should be a generally useful demangler. > __cxa_demangle has a very poorly designed interface and is really only > useful for turning mangled names into strings. The earlier one makes it...
2018 May 06
2
Cannot compile LLVM suite with clang+lld
..._ENABLE_LIBCXX=ON However, the build fails with (many of those error messages): [1274/2712] Linking CXX shared library lib/libc++abi.so.1.0 FAILED: lib/libc++abi.so.1. /usr/bin/ld.lld: error: undefined symbol: _Unwind_Resume >>> referenced by ld-temp.o >>> lto.tmp:(__cxa_demangle) Can anyone please tell me what I am doing wrong and how I can fix the build? Regards Andreas
2016 May 06
2
RFC: Adding an itanium c++ demangler to lib/Support
...loyee so can likely be relicensed with Chris’s permission if required. >>>> >>>>> * How much llvm-like should we try to make it? Should it take an >>>>> StringRef, return an Error and print to a raw_ostream? Or should it >>>>> look more like __cxa_demangle to try to make it easier to move code >>>>> in? >>>> >>>> I believe that it should be a generally useful demangler. __cxa_demangle has a very poorly designed interface and is really only useful for turning mangled names into strings. The earlier one makes i...
2012 Aug 15
0
[LLVMdev] C++ demangling in LLVM
...ng this into the LLVM Support > directory should be done or not? I have a need of being able to use > this, not just for demangling, but also to verify correctness of a > mangled function, and can only rely on LLVM core. > > Micah, > > Why can't you just call the standard __cxa_demangle function? > > -Chris >
2012 Aug 15
2
[LLVMdev] C++ demangling in LLVM
15.08.2012, 19:25, "Villmow, Micah" <Micah.Villmow at amd.com>: > Three reasons. > 1) I need to modify the code to support extensions to the standard demangler. > 2) GCC's version is GPL v3. And? BTW, there is BSD-licensed implementation of __cxa_demangle in libcxxrt > 3) Need windows support. > > Micah -- Regards, Konstantin
2014 Dec 11
2
[LLVMdev] How to get the original function name in C++?
If you want to get the original name by a library function, as Jonathan mentioned, you can call __cxa_demangle in cxxabi.h. However, this API is only available in gcc. If you want something more portable, try glog or libibert, notice libibert is GPL licensed. On Thu, Dec 11, 2014 at 7:57 AM, Roel Jordans <r.jordans at tue.nl> wrote: > When a C++ compiler translates source code it will perform nam...
2018 May 06
0
Cannot compile LLVM suite with clang+lld
...he build fails with (many of those error messages): > > [1274/2712] Linking CXX shared library lib/libc++abi.so.1.0 > FAILED: lib/libc++abi.so.1. > /usr/bin/ld.lld: error: undefined symbol: _Unwind_Resume > >>> referenced by ld-temp.o > >>> lto.tmp:(__cxa_demangle) > > Can anyone please tell me what I am doing wrong and how I can fix the > build? > > Regards > Andreas > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm...
2014 Apr 02
5
[LLVMdev] [lld] adding demangler for symbol resolution
Hi Nick, Bigcheese, When lld is used to link C++ code, it would be required to demangle symbol names by default/user driven option. The Gnu linker has the following options :- --demangle=[style] --no-demangle I found that clang/llvm-symbolizer use __cxx_demangle function. I would think that lld also need to call the same function, and I think the way we want to demangle is to have the
2017 Aug 29
3
how to auto-report LLVM bugs found by fuzzing?
.../bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=label%3AProj-llvm_libcxxabi&colspec=ID+Type+Component+Status+Proj+Reported+Owner+Summary&cells=ids Crash Type: Heap-buffer-overflow READ 8 Crash Address: 0x619000000078 Crash State: __cxxabiv1::parse_encoding __cxxabiv1::demangle __cxa_demangle -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170829/26654c21/attachment.html>
2014 Dec 11
5
[LLVMdev] How to get the original function name in C++?
Hi, everyone! I'm new here trapped by a simple problem for days. When LLVM translates C++ source code to IR, it will add a prefix to the function name. For example: source code: int foo(){ return 1; } IR form: define i32 @_Z3foov() #0 { entry: ret i32 1, !dbg !20 } The getName() method returns _Z3foov, then how can I get foo? I know the debugging information is contained in
2017 Apr 30
1
RFC: Improving the performance of ItaniumDemangle
...libc++. However, we simplified it to make it more portable. The simpifications naturally led to the ability to remove the arena allocation routines. The copy in libc++ needs to retain a certain amount of flexibility due to the exporting of the interface into the user's address space (via the __cxa_demangle interface). However, making adjustments that improve performance in the LLVM version should be acceptable. > >> >> > FYI when I said 14+% (and now it's 17%), I mean the overall performance >> of starting lldb, not just the demangler itself. It's probably several...
2008 Sep 05
0
[LLVMdev] Demangling question
...ol); char * begin = strchr(symbol, '_'); char * demangled_name = NULL; if (begin) { char * end = strchr(begin, ' '); if (end) { *end = 0; int status; demangled_name = abi::__cxa_demangle(begin, buffer, &sz, &status); } } if (demangled_name != NULL) { fprintf(outstream, "%s\n", demangled_name); // Result may be a realloc of input buffer. buffer = demangled_name...