Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Demangling not working correctly #95

Open
MabezDev opened this issue Aug 25, 2022 · 3 comments
Open

Demangling not working correctly #95

MabezDev opened this issue Aug 25, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@MabezDev
Copy link
Member

I believe the trace should be demangling symbols, as per

.and_then(|f| f.demangle().ok().map(|c| c.into_owned()))
.

Sadly it doesn't seem to be working correctly:

Backtrace:
 
0x400d8652
0x400d8652 - _ZN4core3num7flt2dec17digits_to_dec_str17hc32606d1079c94d2E
    at ??:??
0x400d886d
0x400d886d - _ZN4core3num7flt2dec15to_shortest_str17h654526032c2cd997E
    at ??:??
0x400d710c
0x400d710c - _ZN4core3fmt5float32float_to_decimal_common_shortest17h41be84e596d8a6caE.llvm.13434864130540073215
    at ??:??
0x400d717b
0x400d717b - _ZN4core3fmt5float52_$LT$impl$u20$core..fmt..Display$u20$for$u20$f64$GT$3fmt17h59c8e4b96a25ec7cE
    at ??:??
0x400d72be
0x400d72be - _ZN4core3fmt5write17h0ac2b54e9e860323E
    at ??:??
0x400d0bb5
0x400d0bb5 - main
    at ??:??
0x400d12c2
0x400d12c2 - Reset
    at ??:??
0x400d0f60
0x400d0f60 - ESP32Reset
    at ??:??
@MabezDev MabezDev added the bug Something isn't working label Aug 25, 2022
@kelnos
Copy link
Member

kelnos commented Aug 25, 2022

Right, it should be... Can you try with latest main. I've merged a bunch of dependency updates (including addr2line) recently, and it's possible something in there fixed it (assuming it's not epsmonitor's fault). If it works, I can just cut a new release.

@MabezDev
Copy link
Member Author

Ah, so I found it only didn't work in release mode.

I added the following to the release profile settings and it started working.

[profile.release]
debug = true

Which is a slightly odd requirement for name demangling?

@kelnos
Copy link
Member

kelnos commented Aug 31, 2022

Hmm, all I can think of is that the demangled names are stored in debug info, because maybe the demangling of Rust symbols isn't actually set in stone like it is for C++? So there's no standard algorithm that the addr2line crate can use between different versions of rustc? Dunno...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants