digitalmars.D.announce - GDB + ddemangle
- ANtlord (4/4) Apr 19 2018 Hello! I've written a piece of glue code that helps to debug D
- Craig Dillabaugh (2/6) Apr 19 2018 Nice work.
- Joakim (8/12) Apr 20 2018 You are aware that gdb has built-in support for demangling D for
- Basile B. (4/12) Apr 20 2018 I've been told this too, not so long ago, but actually i still
- drug (2/6) Apr 20 2018 But how to enable it? It doesn't work out of box at least for me.
- Mike Wey (5/11) Apr 20 2018 It should be automatic when the executable is build with debugging info....
- drug (3/14) Apr 20 2018 is there a way to check feature availability? What version gdb should
- Basile B. (2/12) Apr 20 2018 it is not, clearly ;)
- Basile B. (3/16) Apr 20 2018 The problem is that one also needs to process the compiler output
- Mike Franklin (7/14) Apr 20 2018 I believe you enable it with `-demangle=dlang`
- drug (10/27) Apr 20 2018 thanks for reply! but gdb don't recognize this option - unknown option
- Iain Buclaw (7/37) Apr 20 2018 GDB auto-detects the language based on DW_LANG tag in the debug info.
- drug (3/12) Apr 20 2018 it works, thank you. But not in all cases. For example when gdb stops on...
- Iain Buclaw (5/18) Apr 20 2018 Using a compiler that implements 2.077 or later (IIRC) probably won't,
- drug (4/9) Apr 20 2018 I see. Thanks for clarification.
- ANtlord (7/12) Apr 24 2018 I launched gdb with command `gdb -ex 'set lang d' test` disabling
- Arun Chandrasekaran (2/12) Apr 26 2019 This stays broken after 1 year. How do we fix this?
- Basile B. (12/26) Apr 26 2019 I recognize your name from IRC, where you posted a related
Hello! I've written a piece of glue code that helps to debug D code using GDB. The code glues together GDB and ddmangle. Checkout the link https://github.com/ANtlord/gdb-ddemangle PRs are welcome!
Apr 19 2018
On Thursday, 19 April 2018 at 12:43:36 UTC, ANtlord wrote:Hello! I've written a piece of glue code that helps to debug D code using GDB. The code glues together GDB and ddmangle. Checkout the link https://github.com/ANtlord/gdb-ddemangle PRs are welcome!Nice work.
Apr 19 2018
On Thursday, 19 April 2018 at 12:43:36 UTC, ANtlord wrote:Hello! I've written a piece of glue code that helps to debug D code using GDB. The code glues together GDB and ddmangle. Checkout the link https://github.com/ANtlord/gdb-ddemangle PRs are welcome!You are aware that gdb has built-in support for demangling D for 3-4 years now? http://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git&a=search&h=HEAD&st=commit&s=ibuclaw I don't know if Iain got all his patches in, but it demangles a lot of symbols for me already. However, I just started using the new lldb package in Termux, and I do miss it there. Otherwise, lldb is very nice and much more stable for me on 64-bit ARM.
Apr 20 2018
On Friday, 20 April 2018 at 10:03:53 UTC, Joakim wrote:On Thursday, 19 April 2018 at 12:43:36 UTC, ANtlord wrote:I've been told this too, not so long ago, but actually i still feed GDB output with ddemangle too (for Coedit 'GDB commander' widget).Hello! I've written a piece of glue code that helps to debug D code using GDB. The code glues together GDB and ddmangle. Checkout the link https://github.com/ANtlord/gdb-ddemangle PRs are welcome!You are aware that gdb has built-in support for demangling D for 3-4 years now?
Apr 20 2018
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.
Apr 20 2018
On 20-04-18 12:36, drug wrote:20.04.2018 13:03, Joakim пишет:It should be automatic when the executable is build with debugging info. `-g` -- Mike WeyYou 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.
Apr 20 2018
20.04.2018 14:06, Mike Wey пишет:On 20-04-18 12:36, drug wrote:is there a way to check feature availability? What version gdb should have etc?20.04.2018 13:03, Joakim пишет:It should be automatic when the executable is build with debugging info. `-g`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.
Apr 20 2018
On Friday, 20 April 2018 at 11:06:47 UTC, Mike Wey wrote:On 20-04-18 12:36, drug wrote:it is not, clearly ;)20.04.2018 13:03, Joakim пишет:It should be automatic when the executable is build with debugging info. `-g`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.
Apr 20 2018
On Friday, 20 April 2018 at 12:28:03 UTC, Basile B. wrote:On Friday, 20 April 2018 at 11:06:47 UTC, Mike Wey wrote:The problem is that one also needs to process the compiler output in an IDE, so finally it doesn't change anything to anythingOn 20-04-18 12:36, drug wrote:it is not, clearly ;)20.04.2018 13:03, Joakim пишет:It should be automatic when the executable is build with debugging info. `-g`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.
Apr 20 2018
On Friday, 20 April 2018 at 10:36:25 UTC, drug wrote:20.04.2018 13:03, Joakim пишет:I believe you enable it with `-demangle=dlang` The original announcement is here: https://forum.dlang.org/post/rvoqllpimfskvlabprot forum.dlang.org There are a few posts on the forum with some example usages: https://forum.dlang.org/search?q=%22demangle%3Ddlang%22&page=1 MikeYou 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.
Apr 20 2018
20.04.2018 15:36, Mike Franklin пишет:On Friday, 20 April 2018 at 10:36:25 UTC, drug wrote: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?20.04.2018 13:03, Joakim пишет:I believe you enable it with `-demangle=dlang` The original announcement is here: https://forum.dlang.org/post/rvoqllpimfskvlabprot forum.dlang.org There are a few posts on the forum with some example usages: https://forum.dlang.org/search?q=%22demangle%3Ddlang%22&page=1 MikeYou 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.
Apr 20 2018
On 20 April 2018 at 14:54, drug via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:20.04.2018 15:36, Mike Franklin пишет: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'On Friday, 20 April 2018 at 10:36:25 UTC, drug wrote: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?20.04.2018 13:03, Joakim пишет:I believe you enable it with `-demangle=dlang` The original announcement is here: https://forum.dlang.org/post/rvoqllpimfskvlabprot forum.dlang.org There are a few posts on the forum with some example usages: https://forum.dlang.org/search?q=%22demangle%3Ddlang%22&page=1 MikeYou 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.
Apr 20 2018
20.04.2018 16:49, Iain Buclaw пишет: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'it works, thank you. But not in all cases. For example when gdb stops on breakpoint it demangle, but if I do `bt` - backtrace isn't demangled.
Apr 20 2018
On 20 April 2018 at 17:40, drug via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:20.04.2018 16:49, Iain Buclaw пишет:Using a compiler that implements 2.077 or later (IIRC) probably won't, due to gdb being too old. They broke ABI by introducing back referencing, no release of gdb supports that yet.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'it works, thank you. But not in all cases. For example when gdb stops on breakpoint it demangle, but if I do `bt` - backtrace isn't demangled.
Apr 20 2018
20.04.2018 20:55, Iain Buclaw пишет:Using a compiler that implements 2.077 or later (IIRC) probably won't, due to gdb being too old. They broke ABI by introducing back referencing, no release of gdb supports that yet.I see. Thanks for clarification. Aren't plugins for gdb like subj more simple way to extend dlang support in gdb then?
Apr 20 2018
On Friday, 20 April 2018 at 17:55:12 UTC, Iain Buclaw wrote:On 20 April 2018 at 17:40, drug via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote: Using a compiler that implements 2.077 or later (IIRC) probably won't, due to gdb being too old. They broke ABI by introducing back referencing, no release of gdb supports that yet.I launched gdb with command `gdb -ex 'set lang d' test` disabling my plugin and I don't see demangling anywhere. Source file is compiled with command `dmd -g test.d` DMD 2.079 GDB 8.1 Did I miss something?
Apr 24 2018
On Wednesday, 25 April 2018 at 05:09:28 UTC, ANtlord wrote:On Friday, 20 April 2018 at 17:55:12 UTC, Iain Buclaw wrote:Yes, read two posts back, by Iain.On 20 April 2018 at 17:40, drug via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote: Using a compiler that implements 2.077 or later (IIRC) probably won't, due to gdb being too old. They broke ABI by introducing back referencing, no release of gdb supports that yet.I launched gdb with command `gdb -ex 'set lang d' test` disabling my plugin and I don't see demangling anywhere. Source file is compiled with command `dmd -g test.d` DMD 2.079 GDB 8.1 Did I miss something?
Apr 24 2018
On Wednesday, 25 April 2018 at 05:12:37 UTC, Joakim wrote:On Wednesday, 25 April 2018 at 05:09:28 UTC, ANtlord wrote:My bad. I wasn't aware on the morning. I mess the sentenceOn Friday, 20 April 2018 at 17:55:12 UTC, Iain Buclaw wrote:Yes, read two posts back, by Iain.On 20 April 2018 at 17:40, drug via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote: Using a compiler that implements 2.077 or later (IIRC) probably won't, due to gdb being too old. They broke ABI by introducing back referencing, no release of gdb supports that yet.I launched gdb with command `gdb -ex 'set lang d' test` disabling my plugin and I don't see demangling anywhere. Source file is compiled with command `dmd -g test.d` DMD 2.079 GDB 8.1 Did I miss something?They broke ABI by introducing back referencing, no release of gdb supports that yet
Apr 25 2018
On Friday, 20 April 2018 at 17:55:12 UTC, Iain Buclaw wrote:On 20 April 2018 at 17:40, drug via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:This stays broken after 1 year. How do we fix this?20.04.2018 16:49, Iain Buclaw пишет:Using a compiler that implements 2.077 or later (IIRC) probably won't, due to gdb being too old. They broke ABI by introducing back referencing, no release of gdb supports that yet.[...]it works, thank you. But not in all cases. For example when gdb stops on breakpoint it demangle, but if I do `bt` - backtrace isn't demangled.
Apr 26 2019
On Friday, 26 April 2019 at 07:08:45 UTC, Arun Chandrasekaran wrote:On Friday, 20 April 2018 at 17:55:12 UTC, Iain Buclaw wrote:I recognize your name from IRC, where you posted a related question yesterday. The person in charge for D in GDB had answered: The problem is that the mangling scheme has changed (to produce shorter mangles). Demangling will be eventually supported when D will be in GCC for good (GCC 10) and then he would port the demangling from GCC to GDB. So for now demangling of D in GDB only work if the binary is compiled with a very old version of the compiler, i.e prior to the new mangling method.On 20 April 2018 at 17:40, drug via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:This stays broken after 1 year. How do we fix this?20.04.2018 16:49, Iain Buclaw пишет:Using a compiler that implements 2.077 or later (IIRC) probably won't, due to gdb being too old. They broke ABI by introducing back referencing, no release of gdb supports that yet.[...]it works, thank you. But not in all cases. For example when gdb stops on breakpoint it demangle, but if I do `bt` - backtrace isn't demangled.
Apr 26 2019