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

Add Apple visionOS support #613

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

QuentinPerez
Copy link

Motivation

Add the support of Apple VisionOS 121419

Solution

Add target_os = "visionos"

src/backtrace/mod.rs Outdated Show resolved Hide resolved
src/symbolize/gimli.rs Outdated Show resolved Hide resolved
@workingjubilee
Copy link
Contributor

workingjubilee commented Apr 15, 2024

@QuentinPerez Have you tested this? Does visionOS actually support backtraces with this patch, and a rustc/stdlib updated to use it? Surely it must be easy to record a mote of proof.

src/symbolize/gimli.rs Outdated Show resolved Hide resolved
src/backtrace/mod.rs Outdated Show resolved Hide resolved
src/symbolize/gimli.rs Outdated Show resolved Hide resolved
src/symbolize/gimli.rs Outdated Show resolved Hide resolved
@QuentinPerez
Copy link
Author

@QuentinPerez Have you tested this? Does visionOS actually support backtraces with this patch, and a rustc/stdlib updated to use it? Surely it must be easy to record a mote of proof.

Yes, I tested it, here is a example of the output with and without the patch

// Before
current_backtrace =    0:        0x1057aea88 - <unknown>
   1:        0x1057aea34 - <unknown>
   2:        0x105787cc0 - <unknown>
   3:        0x105787c38 - <unknown>
   4:        0x105753c24 - <unknown>
   5:        0x105760648 - <unknown>

// After
   backtrace[3e08695382c39b1]::backtrace::trace_unsynchronized::<<backtrace[3e08695382c39b1]::capture::Backtrace>::create::{closure#0}>
   1:        0x104b7d688 - backtrace[3e08695382c39b1]::backtrace::trace::<<backtrace[3e08695382c39b1]::capture::Backtrace>::create::{closure#0}>
   2:        0x104b9c518 - <backtrace[3e08695382c39b1]::capture::Backtrace>::create
   3:        0x104b9c490 - <backtrace[3e08695382c39b1]::capture::Backtrace>::new
   4:        0x104b2dea4 - <object[c239c684900fc29f]::ffi::Obj>::new
   5:        0x104b3a8c8 - object[c239c684900fc29f]::ffi::stream::object_fn_new::{closure#1}

Copy link
Contributor

@workingjubilee workingjubilee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice! Thank you, that looks great.

@QuentinPerez
Copy link
Author

can we merge it ?

@madsmtm
Copy link

madsmtm commented May 6, 2024

Could you also update the target_os = "macos" in tests/accuracy/main.rs and crates/macos_frames_test/tests/main.rs? Not that they're currently run by CI, but they could be in the future (esp. on Mac Catalyst).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants