Re: `KSYM_NAME_LEN` strikes again
From: Miguel Ojeda
Date: Mon Dec 01 2025 - 11:32:32 EST
On Mon, Dec 1, 2025 at 10:15 AM david laight <david.laight@xxxxxxxxxx> wrote:
>
> Given that is even more unreadable than a typical C++ name is it actually worth printing?
> Looking at it, perhaps some of the inner <...> could be replaced with a hash
> (possibly with the last real name added) with the ability to look up the hash
> in a separate table if needed.
For printing, yeah, parts could be skipped. But if we are looking into
replacing parts of the mangling scheme, then at that point we could go
with the single hash (although, yes, at least seeing "something" could
perhaps clarify in some cases).
> I think that is equivalent to using a short name for a type?
Do you mean skipping the paths and/or the generics etc.?
(That expansion I showed is actually already a "short" version in at
least one way: it doesn't print add the actual crate hash, which e.g.
the GNU c++filt prints without `--no-verbose`, and typically appears
between brackets, e.g. `kernel[e6083e32b3c2ec6]::sync::lock...).
Cheers,
Miguel