|
@@ -94,12 +94,12 @@ pub type PersonalityRoutine = extern "C" fn(
|
|
) -> UnwindReasonCode;
|
|
) -> UnwindReasonCode;
|
|
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
-pub extern "C" fn _Unwind_GetGR(unwind_ctx: &mut UnwindContext<'_>, index: c_int) -> usize {
|
|
|
|
|
|
+pub extern "C" fn _Unwind_GetGR(unwind_ctx: &UnwindContext<'_>, index: c_int) -> usize {
|
|
unwind_ctx.ctx[Register(index as u16)]
|
|
unwind_ctx.ctx[Register(index as u16)]
|
|
}
|
|
}
|
|
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
-pub extern "C" fn _Unwind_GetCFA(unwind_ctx: &mut UnwindContext<'_>) -> usize {
|
|
|
|
|
|
+pub extern "C" fn _Unwind_GetCFA(unwind_ctx: &UnwindContext<'_>) -> usize {
|
|
unwind_ctx.ctx[Arch::SP]
|
|
unwind_ctx.ctx[Arch::SP]
|
|
}
|
|
}
|
|
|
|
|
|
@@ -109,13 +109,13 @@ pub extern "C" fn _Unwind_SetGR(unwind_ctx: &mut UnwindContext<'_>, index: c_int
|
|
}
|
|
}
|
|
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
-pub extern "C" fn _Unwind_GetIP(unwind_ctx: &mut UnwindContext<'_>) -> usize {
|
|
|
|
|
|
+pub extern "C" fn _Unwind_GetIP(unwind_ctx: &UnwindContext<'_>) -> usize {
|
|
unwind_ctx.ctx[Arch::RA]
|
|
unwind_ctx.ctx[Arch::RA]
|
|
}
|
|
}
|
|
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
pub extern "C" fn _Unwind_GetIPInfo(
|
|
pub extern "C" fn _Unwind_GetIPInfo(
|
|
- unwind_ctx: &mut UnwindContext<'_>,
|
|
|
|
|
|
+ unwind_ctx: &UnwindContext<'_>,
|
|
ip_before_insn: &mut c_int,
|
|
ip_before_insn: &mut c_int,
|
|
) -> usize {
|
|
) -> usize {
|
|
*ip_before_insn = 0;
|
|
*ip_before_insn = 0;
|
|
@@ -129,7 +129,7 @@ pub extern "C" fn _Unwind_SetIP(unwind_ctx: &mut UnwindContext<'_>, value: usize
|
|
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
pub extern "C" fn _Unwind_GetLanguageSpecificData(
|
|
pub extern "C" fn _Unwind_GetLanguageSpecificData(
|
|
- unwind_ctx: &mut UnwindContext<'_>,
|
|
|
|
|
|
+ unwind_ctx: &UnwindContext<'_>,
|
|
) -> *mut c_void {
|
|
) -> *mut c_void {
|
|
unwind_ctx
|
|
unwind_ctx
|
|
.frame
|
|
.frame
|
|
@@ -138,12 +138,12 @@ pub extern "C" fn _Unwind_GetLanguageSpecificData(
|
|
}
|
|
}
|
|
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
-pub extern "C" fn _Unwind_GetRegionStart(unwind_ctx: &mut UnwindContext<'_>) -> usize {
|
|
|
|
|
|
+pub extern "C" fn _Unwind_GetRegionStart(unwind_ctx: &UnwindContext<'_>) -> usize {
|
|
unwind_ctx.frame.map(|f| f.initial_address()).unwrap_or(0)
|
|
unwind_ctx.frame.map(|f| f.initial_address()).unwrap_or(0)
|
|
}
|
|
}
|
|
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
-pub extern "C" fn _Unwind_GetTextRelBase(unwind_ctx: &mut UnwindContext<'_>) -> usize {
|
|
|
|
|
|
+pub extern "C" fn _Unwind_GetTextRelBase(unwind_ctx: &UnwindContext<'_>) -> usize {
|
|
unwind_ctx
|
|
unwind_ctx
|
|
.frame
|
|
.frame
|
|
.map(|f| f.bases().eh_frame.text.unwrap() as _)
|
|
.map(|f| f.bases().eh_frame.text.unwrap() as _)
|
|
@@ -151,7 +151,7 @@ pub extern "C" fn _Unwind_GetTextRelBase(unwind_ctx: &mut UnwindContext<'_>) ->
|
|
}
|
|
}
|
|
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
-pub extern "C" fn _Unwind_GetDataRelBase(unwind_ctx: &mut UnwindContext<'_>) -> usize {
|
|
|
|
|
|
+pub extern "C" fn _Unwind_GetDataRelBase(unwind_ctx: &UnwindContext<'_>) -> usize {
|
|
unwind_ctx
|
|
unwind_ctx
|
|
.frame
|
|
.frame
|
|
.map(|f| f.bases().eh_frame.data.unwrap() as _)
|
|
.map(|f| f.bases().eh_frame.data.unwrap() as _)
|