Re: [PATCH] libiberty rust-demangle, ignore .suffix

2022-01-15 Thread Mark Wielaard
Hi Eddy, On Mon, Dec 20, 2021 at 01:50:52PM +0200, Eduard-Mihai Burtescu wrote: > Apologies for the delay, the email fell through the cracks somehow. And then I went on vacation... Sorry this fairly simple patch takes so long. > The updated patch looks like it would work alright, only needs a co

Re: [PATCH] libiberty rust-demangle, ignore .suffix

2021-12-20 Thread Eduard-Mihai Burtescu
Apologies for the delay, the email fell through the cracks somehow. The updated patch looks like it would work alright, only needs a couple tests, e.g.: https://github.com/rust-lang/rustc-demangle/blob/2811a1ad6f7c8bead2ef3671e4fdc10de1553e96/src/lib.rs#L413-L422 https://github.com/rust-lang/rust

Re: [PATCH] libiberty rust-demangle, ignore .suffix

2021-12-07 Thread Mark Wielaard
sure we (currently) have users who want this. > As mentioned above, ".llvm." is handled differently, just above the snippet > linked - perhaps it was deemed too common to let it pollute the output. But that also makes it a slightly odd interface. I would imagine that people would be i

Re: [PATCH] libiberty rust-demangle, ignore .suffix

2021-12-02 Thread Eduard-Mihai Burtescu
On Fri, Dec 3, 2021, at 00:07, Mark Wielaard wrote: > Hi Eddy, > > On Thu, Dec 02, 2021 at 07:35:17PM +0200, Eduard-Mihai Burtescu wrote: >> On Thu, Dec 2, 2021, at 19:17, Mark Wielaard wrote: >> > Rust v0 symbols can have a .suffix because if compiler transformations. >> >> For some context, the

Re: [PATCH] libiberty rust-demangle, ignore .suffix

2021-12-02 Thread Mark Wielaard
Hi, On Fri, Dec 03, 2021 at 06:58:36AM +1100, Nicholas Nethercote wrote: > On Fri, 3 Dec 2021 at 04:17, Mark Wielaard wrote: > > > > * rust-demangle.c (rust_demangle_callback): Ignore everything > > after '.' char in sym for v0. > > > > I just applied this change to Valgrind's co

Re: [PATCH] libiberty rust-demangle, ignore .suffix

2021-12-02 Thread Mark Wielaard
Hi Eddy, On Thu, Dec 02, 2021 at 07:35:17PM +0200, Eduard-Mihai Burtescu wrote: > On Thu, Dec 2, 2021, at 19:17, Mark Wielaard wrote: > > Rust v0 symbols can have a .suffix because if compiler transformations. > > For some context, the suffix comes from LLVM (I believe as part of > its LTO). If

Re: [PATCH] libiberty rust-demangle, ignore .suffix

2021-12-02 Thread Nicholas Nethercote via Gcc-patches
On Fri, 3 Dec 2021 at 04:17, Mark Wielaard wrote: > > * rust-demangle.c (rust_demangle_callback): Ignore everything > after '.' char in sym for v0. > I just applied this change to Valgrind's copy of rust-demangle.c and I can confirm that it works -- the symbols that were failing

Re: [PATCH] libiberty rust-demangle, ignore .suffix

2021-12-02 Thread Eduard-Mihai Burtescu
On Thu, Dec 2, 2021, at 19:17, Mark Wielaard wrote: > Rust v0 symbols can have a .suffix because if compiler transformations. For some context, the suffix comes from LLVM (I believe as part of its LTO). If this were a semantic part of a Rust symbol, it would have an encoding within v0 (as we alre

[PATCH] libiberty rust-demangle, ignore .suffix

2021-12-02 Thread Mark Wielaard
Rust v0 symbols can have a .suffix because if compiler transformations. These can be ignored it the demangled name. Which is what this patch implements). But an alternative implementation could be to follow what C++ does and represent these as [clone .suffix] tagged onto the demangled name. But thi