Make UnwindTraceFn take &UnwindContext
only
This commit is contained in:
parent
2f9e374431
commit
f5ef1d145e
@ -78,7 +78,7 @@ pub struct UnwindException {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub type UnwindTraceFn =
|
pub type UnwindTraceFn =
|
||||||
extern "C" fn(ctx: &mut UnwindContext<'_>, arg: *mut c_void) -> UnwindReasonCode;
|
extern "C" fn(ctx: &UnwindContext<'_>, arg: *mut c_void) -> UnwindReasonCode;
|
||||||
|
|
||||||
#[cfg(not(feature = "unwinder"))]
|
#[cfg(not(feature = "unwinder"))]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
@ -60,7 +60,7 @@ fn stack_trace() {
|
|||||||
counter: usize,
|
counter: usize,
|
||||||
}
|
}
|
||||||
extern "C" fn callback(
|
extern "C" fn callback(
|
||||||
unwind_ctx: &mut UnwindContext<'_>,
|
unwind_ctx: &UnwindContext<'_>,
|
||||||
arg: *mut c_void,
|
arg: *mut c_void,
|
||||||
) -> UnwindReasonCode {
|
) -> UnwindReasonCode {
|
||||||
let data = unsafe { &mut *(arg as *mut CallbackData) };
|
let data = unsafe { &mut *(arg as *mut CallbackData) };
|
||||||
|
@ -390,7 +390,7 @@ pub extern "C-unwind" fn _Unwind_Backtrace(
|
|||||||
let frame = try1!(Frame::from_context(&ctx, signal));
|
let frame = try1!(Frame::from_context(&ctx, signal));
|
||||||
if !skipping {
|
if !skipping {
|
||||||
let code = trace(
|
let code = trace(
|
||||||
&mut UnwindContext {
|
&UnwindContext {
|
||||||
frame: frame.as_ref(),
|
frame: frame.as_ref(),
|
||||||
ctx: &mut ctx,
|
ctx: &mut ctx,
|
||||||
signal,
|
signal,
|
||||||
|
Loading…
Reference in New Issue
Block a user