digitalmars.D.announce - D demangler for C++
- Witold Baryluk (21/21) Nov 27 2022 https://github.com/baryluk/d-demangle-cpp
- Hipreme (3/6) Nov 27 2022 Seems like a nice idea integrating to those 3rd party code :)
- max haughton (3/6) Nov 28 2022 Wouldn't some of those tools already have one via libiberty?
- Witold Baryluk (14/23) Nov 28 2022 `libiberty` has way more things than just D demangler. And some
- max haughton (4/19) Nov 28 2022 This demangler I think is already available under a different
- Iain Buclaw (7/25) Nov 30 2022 As the author, you're free to re-license that file as whatever so
- thebluepandabear (2/2) Dec 19 2022 Nice work. What is the process for learning how to make a project
https://github.com/baryluk/d-demangle-cpp D programming language (dlang) symbol name demangler for C++ ```cpp std::cout << demangle_d::demangle("_D3std5stdio__T8writeflnTaTiZQoFNfxAaiZv") << std::endl; // Will print: void std.stdio.writefln!(char, int)(const char[], int) safe ``` Goals * Easy of integration into any C++ codebase * Flexible * Code simplicity following the spec closely in shape Status: Alpha. The principal motivation was to have a clean-room, from scratch implementation, that can be easily used in various contexts. The code base is simple, and can be easily ported to other languages, and environment (i.e. kernel space). Once this is polished down, I will be pushing this demangler to be integrated into few 3rd party code bases, for example Valgrind / massif, heapcheak, pprof, tcmalloc, Linux perf, etc.
Nov 27 2022
On Sunday, 27 November 2022 at 23:12:35 UTC, Witold Baryluk wrote:https://github.com/baryluk/d-demangle-cpp D programming language (dlang) symbol name demangler for C++ [...]Seems like a nice idea integrating to those 3rd party code :) Better debuggability for D code is always nice
Nov 27 2022
On Sunday, 27 November 2022 at 23:12:35 UTC, Witold Baryluk wrote:https://github.com/baryluk/d-demangle-cpp D programming language (dlang) symbol name demangler for C++ [...]Wouldn't some of those tools already have one via libiberty? https://github.com/gcc-mirror/gcc/blob/master/libiberty/d-demangle.c
Nov 28 2022
On Monday, 28 November 2022 at 12:48:15 UTC, max haughton wrote:On Sunday, 27 November 2022 at 23:12:35 UTC, Witold Baryluk wrote:`libiberty` has way more things than just D demangler. And some projects might not be comfortable with its licensing. And libiberty uses autoconf / automake, which is just gross for most people. The idea is to have something simpler, portable (zero conf), just for this task, so it is as easy as possible to integrate and have flexible licensing. Many of the tools do not use libiberty, but just call `abi::__cxa_demangle` for example. Take a look for for a heaptrack tool: https://github.com/KDE/heaptrack/blob/master/src/interpret/heaptrack_interpret.cpp#L40-L56 You are free to use `libiberty` if you want. My demangler is just another option.https://github.com/baryluk/d-demangle-cpp D programming language (dlang) symbol name demangler for C++ [...]Wouldn't some of those tools already have one via libiberty? https://github.com/gcc-mirror/gcc/blob/master/libiberty/d-demangle.c
Nov 28 2022
On Monday, 28 November 2022 at 16:16:43 UTC, Witold Baryluk wrote:On Monday, 28 November 2022 at 12:48:15 UTC, max haughton wrote:This demangler I think is already available under a different licence inside LLVM (I think). My point was mainly to make sure you knew it existed.[...]`libiberty` has way more things than just D demangler. And some projects might not be comfortable with its licensing. And libiberty uses autoconf / automake, which is just gross for most people. The idea is to have something simpler, portable (zero conf), just for this task, so it is as easy as possible to integrate and have flexible licensing. Many of the tools do not use libiberty, but just call `abi::__cxa_demangle` for example. Take a look for for a heaptrack tool: https://github.com/KDE/heaptrack/blob/master/src/interpret/heaptrack_interpret.cpp#L40-L56 You are free to use `libiberty` if you want. My demangler is just another option.
Nov 28 2022
On Monday, 28 November 2022 at 16:16:43 UTC, Witold Baryluk wrote:On Monday, 28 November 2022 at 12:48:15 UTC, max haughton wrote:As the author, you're free to re-license that file as whatever so long as you email me for permission. A clean-room implementation would likely be better though - libibert/d-demangle.c comes with backwards compatibility baggage that anyone implementing a tool/library today would not be interested in.Wouldn't some of those tools already have one via libiberty? https://github.com/gcc-mirror/gcc/blob/master/libiberty/d-demangle.c`libiberty` has way more things than just D demangler. And some projects might not be comfortable with its licensing. And libiberty uses autoconf / automake, which is just gross for most people. The idea is to have something simpler, portable (zero conf), just for this task, so it is as easy as possible to integrate and have flexible licensing. Many of the tools do not use libiberty, but just call `abi::__cxa_demangle` for example. Take a look for for a heaptrack tool: https://github.com/KDE/heaptrack/blob/master/src/interpret/heaptrack_interpret.cpp#L40-L56 You are free to use `libiberty` if you want. My demangler is just another option.
Nov 30 2022
Nice work. What is the process for learning how to make a project such a de-mangler if you don't mind me asking? :)
Dec 19 2022