On 20 April 2018 at 14:54, drug via Digitalmars-d-announce <[email protected]> wrote: > 20.04.2018 15:36, Mike Franklin пишет: > >> On Friday, 20 April 2018 at 10:36:25 UTC, drug wrote: >>> >>> 20.04.2018 13:03, Joakim пишет: >>>> >>>> >>>> You are aware that gdb has built-in support for demangling D for 3-4 >>>> years now? >>>> >>> But how to enable it? It doesn't work out of box at least for me. >> >> >> I believe you enable it with `-demangle=dlang` >> >> The original announcement is here: >> https://forum.dlang.org/post/[email protected] >> >> There are a few posts on the forum with some example usages: >> https://forum.dlang.org/search?q=%22demangle%3Ddlang%22&page=1 >> >> Mike > > thanks for reply! but gdb don't recognize this option - unknown option > "--demangle=dlang" > > ``` > $gdb --version > GNU gdb (Debian 7.12-6) 7.12.0.20161007-git > Copyright (C) 2016 Free Software Foundation, Inc. > ... > ``` > > Or it is intended to work only using `objdump` etc?
GDB auto-detects the language based on DW_LANG tag in the debug info. If you are starting up gdb without a program to debug, you can explicitly switch with: set lang d Then try something like: demangle _D3fooFiZv Or if you want it to start up in D mode: gdb -ex 'set lang d'
