[Lldb-commits] [PATCH] D44321: Support demangling for D symbols via dlopen

Johan Engelen via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Mar 11 05:28:55 PDT 2018


johanengelen added a comment.

In https://reviews.llvm.org/D44321#1034168, @johanengelen wrote:

>   extern "C" char* lldbd_demangle(size_t length, const char* mangled) {
>      if (mangled == "_D3fooFZv") // pseudo code
>          return "void foo()";
>      else
>          return mangled;
>   }
>


Actually, this is not the correct interface is it? The returned pointer should point to newly allocated memory using `malloc`, right?
Good to document that somewhere.


https://reviews.llvm.org/D44321





More information about the lldb-commits mailing list