Skip to content
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

Use unwinding crate for unwinding on Xous platform #117072

Merged
merged 7 commits into from
Dec 6, 2023

Commits on Nov 16, 2023

  1. unwind: add support for using unwinding crate

    The `unwinding` crate supports processing unwinding data, and is written
    entirely in Rust. This allows it to be ported to new platforms more
    easily than using the llvm-based `libunwind`.
    
    While `libunwind` is very well supported on major targets, it is
    difficult to use on other targets. SGX is an example of this where Rust
    carries custom patches in order to enable backtrace support.
    
    This adds an alternative for supported architectures. Rather than
    providing a custom target, `unwinding` allows for a solution that is
    completely written in Rust.
    
    This adds `xous` as the first consumer, and forthcoming patches will
    modify libstd to take advantage of this.
    
    Signed-off-by: Sean Cross <sean@xobs.io>
    xobs committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    ee870d6 View commit details
    Browse the repository at this point in the history
  2. panic_unwind: support unwinding on xous

    Now that `unwind` supports Xous, enable unwinding panics on Xous.
    
    Signed-off-by: Sean Cross <sean@xobs.io>
    xobs committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    2820317 View commit details
    Browse the repository at this point in the history
  3. std: personality: support gcc personality on Xous

    Xous as an operating system is compiled with gcc-type personalities when
    it comes to unwinding. This enables unwinding inside panics on Xous,
    which enables Rust tests.
    
    Signed-off-by: Sean Cross <sean@xobs.io>
    xobs committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    1828cf8 View commit details
    Browse the repository at this point in the history
  4. compiler: enable unwinding on riscv32imac_unknown_xous_elf

    Now that everything is in place to support unwinding on Xous, enable
    this for that target.
    
    Signed-off-by: Sean Cross <sean@xobs.io>
    xobs committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    bf0e0af View commit details
    Browse the repository at this point in the history
  5. Cargo.lock: add unwinding to lock file

    Add `unwinding` as a dependency. This is required on platforms where
    unwinding isn't provided by llvm.
    
    Signed-off-by: Sean Cross <sean@xobs.io>
    xobs committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    2a533df View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2023

  1. std: xous: take eh_frame address from main args

    The main() function takes an argument that contains the eh_frame
    address. Implement `unwinding` support by looking for unwinding data at
    this address.
    
    Signed-off-by: Sean Cross <sean@xobs.io>
    xobs committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    a6b8de6 View commit details
    Browse the repository at this point in the history
  2. tidy: add unwinding as an allowed dependency

    Add `unwinding` as a permitted dependency of rustc, as it is now used as
    part of panic unwinding within platforms such as Xous.
    
    Signed-off-by: Sean Cross <sean@xobs.io>
    xobs committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    0773afc View commit details
    Browse the repository at this point in the history