-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some functions fail to produce Rust output or even pick up the right function #121
Comments
Did Rust mangling scheme change already? I recall there being an RFC about this. Maybe upgrading rustc_demangle fixes this, but I'm not sure. |
No, this is with stable: There's now support for a new mangling scheme in nightly but it's also not turned on by default yet. |
NB: It works in a lot of of cases and fails in a lot of other cases within the same crate with the same tooling. e.g.:
|
You might want to inspect the real assembly generated by rustc (and not the one reported by Right now it is not possible to pass |
Ooh. I think we have something here... There're three
The
Funny enough I've a few slightly differing |
FWIW, The reason we do it this way is that LLVM actually has support for embedding comments in the textual assembly generated, and we wanted to show those too, but rustc doesn't really support that very good right now. The alternative here would be to compile the binary normally, and then disassemble it, and try to look for the function symbols there. Sometimes I wish I would have gone this way. |
Not so sure disassembling the final binary is a good approach. Even with "debug info" in the final release binary the information level is really lacking which is one of the reasons I care so much about |
Yeah, i'm not sure either. More than about the quality of the assembly displayed, I thought it might be an interesting approach to explore to produce something more faithful to what's executed, and also for speed. Compiling and linking a binary, and then doing a disassembly, is for whatever reason much faster than dumping the textual assembly through LLVM. |
This issue is constantly getting in my way. I just encountered a function in a library that I cannot seem to get the assembly for, even when wrapping it in a |
I suppose you are then searching for that |
I managed to get a reproduction for the stable channel. I am trying to get the assembly from my
in
and running Another problem I have is that |
It seems to me that |
I haven't quite figured out what triggers the erratic behaviour but for some functions I'd get something like:
or
In both cases
cargo-asm
seems to have picked up the incorrect function and to demangle the symbols.The text was updated successfully, but these errors were encountered: