Thread overview | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 13, 2015 Binutils 2.25 Released - New D demangling support | ||||
---|---|---|---|---|
| ||||
Hi, I'm not sure when it was announced, but binutils 2.25 has been released! There's a small reason for excitement as it is the first to come with D demangling support in the GNU toolchain. Unfortunately, I forgot to send in patches that actually document it! So for the moment, it's a little secret feature shared between all who may read this. :o) How do you use it? --- By default, binutils programs will treat all mangled symbols as C++, however you can override this by using --demangle=dlang, eg: objdump -d --demangle=dlang prog.o nm --demangle=dlang ddmd You can also kickstart your usage by putting -L--demangle=dlang in your dmd.conf, and watch your obscure linker errors turn into pretty function signatures. How do I get it? --- The release itself is a source package, however a safer choice is to get the release binaries through your Linux distributor. Fortunately, there have been distributions who have been shipping it as early as three weeks ago. Archlinux users: I'd imagine this is available to use now. Ubuntu users: You'll have to wait until April with the 15.04 release. Bugs and Fixes --- Whilst the demangler is able to handle all things core.demangle can do (and a little bit more!), a small test of running nm against the ddemangle program that gets shipped with dmd 2.066 shows that there are still plenty of complex template symbols that it still can't manage. The implementation itself is pretty straightforward to follow, well documented and written in C. Volunteers who wish to help out getting as close to 99.99% coverage as possible are welcome! Enjoy! Iain. |
January 13, 2015 Re: Binutils 2.25 Released - New D demangling support | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | On Tuesday, 13 January 2015 at 21:31:15 UTC, Iain Buclaw wrote:
> Hi,
>
> I'm not sure when it was announced, but binutils 2.25 has been released! There's a small reason for excitement as it is the first to come with D demangling support in the GNU toolchain.
>
> Unfortunately, I forgot to send in patches that actually document it! So for the moment, it's a little secret feature shared between all who may read this. :o)
>
>
> How do you use it?
> ---
>
> By default, binutils programs will treat all mangled symbols as C++, however you can override this by using --demangle=dlang, eg:
>
> objdump -d --demangle=dlang prog.o
>
> nm --demangle=dlang ddmd
>
>
> You can also kickstart your usage by putting -L--demangle=dlang in your dmd.conf, and watch your obscure linker errors turn into pretty function signatures.
Could you add this note somewhere visible into the wiki so it doesn't get lost?
Also, could DMD do this by default if available so it works out of the box?
|
January 13, 2015 Re: Binutils 2.25 Released - New D demangling support | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | This deserve to be on reddit. |
January 13, 2015 Re: Binutils 2.25 Released - New D demangling support | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw Attachments: | On Tue, 13 Jan 2015 21:31:14 +0000 Iain Buclaw via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: > Hi, > > I'm not sure when it was announced, but binutils 2.25 has been released! There's a small reason for excitement as it is the first to come with D demangling support in the GNU toolchain. > > Unfortunately, I forgot to send in patches that actually document it! So for the moment, it's a little secret feature shared between all who may read this. :o) wow! this is great news! i'm off to rebuild my binutils package. ;-) |
January 13, 2015 Re: Binutils 2.25 Released - New D demangling support | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kiith-Sa | On 13 January 2015 at 21:39, Kiith-Sa via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: > On Tuesday, 13 January 2015 at 21:31:15 UTC, Iain Buclaw wrote: >> >> Hi, >> >> I'm not sure when it was announced, but binutils 2.25 has been released! There's a small reason for excitement as it is the first to come with D demangling support in the GNU toolchain. >> >> Unfortunately, I forgot to send in patches that actually document it! So for the moment, it's a little secret feature shared between all who may read this. :o) >> >> >> How do you use it? >> --- >> >> By default, binutils programs will treat all mangled symbols as C++, however you can override this by using --demangle=dlang, eg: >> >> objdump -d --demangle=dlang prog.o >> >> nm --demangle=dlang ddmd >> >> >> You can also kickstart your usage by putting -L--demangle=dlang in your dmd.conf, and watch your obscure linker errors turn into pretty function signatures. > > > Could you add this note somewhere visible into the wiki so it doesn't get lost? > > Also, could DMD do this by default if available so it works out of the box? This can be done, but I'd rather it be added later instead of now when it is more likely that the reader is running a system that has binutils 2.25+ installed. For having this as default dmd.conf setting in future DMD releases, there will have to be an even longer waiting period of at least a year and a bit before it gets added. This will allow users to upgrade to their systems to a version of binutils which supports this feature, otherwise you are risking (in their eyes) breaking DMD with no obvious good reason. The auto-tester build systems will need to be upgraded also... Iain. |
January 13, 2015 Re: Binutils 2.25 Released - New D demangling support | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | This looks great!
Does this mean anything with respect to getting better demangling in GDB?
--
Paul O'Neil
Github / IRC: todayman
|
January 13, 2015 Re: Binutils 2.25 Released - New D demangling support | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul O'Neil Attachments: | On Tue, 13 Jan 2015 17:07:02 -0500 "Paul O'Neil via Digitalmars-d-announce" <digitalmars-d-announce@puremagic.com> wrote: > This looks great! > > Does this mean anything with respect to getting better demangling in GDB? it seems to be so. at least i see in git some words about "using gdb demangler" and such. |
January 13, 2015 Re: Binutils 2.25 Released - New D demangling support | ||||
---|---|---|---|---|
| ||||
Posted in reply to deadalnix | On 1/13/15 1:51 PM, deadalnix wrote: > This deserve to be on reddit. Ask, and ye shall receive. http://www.reddit.com/r/programming/comments/2sbxto/gnu_binutils_225_released_with_d_demangling/ Andrie |
January 13, 2015 Re: Binutils 2.25 Released - New D demangling support | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul O'Neil | On 13 January 2015 at 22:07, Paul O'Neil via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: > This looks great! > > Does this mean anything with respect to getting better demangling in GDB? > This was first written for GDB (announced at DConf 2014) but without the template demangling. Then later migrated over to a libiberty - with template demangling (announced October 2014) that made it common code between both GDB and Binutils. Iain. |
January 13, 2015 Re: Binutils 2.25 Released - New D demangling support | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | On 01/13/2015 05:22 PM, ketmar via Digitalmars-d-announce wrote: > On Tue, 13 Jan 2015 17:07:02 -0500 > "Paul O'Neil via Digitalmars-d-announce" > <digitalmars-d-announce@puremagic.com> wrote: > >> This looks great! >> >> Does this mean anything with respect to getting better demangling in GDB? > it seems to be so. at least i see in git some words about "using gdb demangler" and such. > Paying attention to the stack trace right in front of me shows properly demangled D names! Even more awesome! -- Paul O'Neil Github / IRC: todayman |
Copyright © 1999-2021 by the D Language Foundation