backtrace-rs icon indicating copy to clipboard operation
backtrace-rs copied to clipboard

Add Apple visionOS support

Open QuentinPerez opened this issue 10 months ago • 4 comments

Motivation

Add the support of Apple VisionOS 121419

Solution

Add target_os = "visionos"

QuentinPerez avatar Apr 13 '24 10:04 QuentinPerez

@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.

workingjubilee avatar Apr 15 '24 01:04 workingjubilee

@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}

QuentinPerez avatar Apr 16 '24 14:04 QuentinPerez

can we merge it ?

QuentinPerez avatar Apr 24 '24 23:04 QuentinPerez

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).

madsmtm avatar May 06 '24 04:05 madsmtm

Hmm, I am going to simply ignore the rust-lld failure.

workingjubilee avatar May 27 '24 03:05 workingjubilee