-
Notifications
You must be signed in to change notification settings - Fork 237
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
Doesn't build in no_std env but it seems like it is supposed to build there #438
Comments
It can't work in no_std environments as it depends on the standard library to load debuginfo, on libc/winapi to get information about where each dylib is loaded and libunwind/winapi to get a raw backtrace in the first place. What is the exact use case you have? |
I'm developing a bare-metal x86_64 binary, or better to say the initial roottask running under a microkernel. If I have a callstack of
I think this should be possible with Why does this lib has |
Looks like without libstd it can still somewhat work, but I think it isn't able to show symbol names and source locations in that case. Only addresses: Line 66 in cc89bb6
I am pretty sure it still requires libunwind when the std feature is disabled.
Under non-kernel conditions there may be multiple .eh_frame sections. One for the main executable and one for each dylib. To locate them the unwinder needs help from libc. For a kernel unwinder you could use something like redox-os' kernel unwinder: https://gitlab.redox-os.org/redox-os/kernel/-/blob/master/src/arch/x86_64/interrupt/trace.rs It requires frame pointers, but it is much simpler than a full dwarf unwinder ( Alternatively you could use this crate as pure-rust no_std compatible unwinder: https://github.com/nbdd0121/unwind |
This crate does build for Maybe https://github.com/Amanieu/mini-backtrace works for your use.
Looking at the history, it was added in #126 for the purpose of making this crate a dependency of |
I wanted to use this library in a
no_std
environment, but it doesn't compile because of theminiz_oxide
crate. If I see it correctly inCargo.toml
andlib.rs
, this crate is supposed to work inno_std
-environments.I'd like to propose the following changes:
README.md
if this crate actually supportsno_std
and what one has to do for itThe build error for my
x86_64 no_std
-target is:The text was updated successfully, but these errors were encountered: