mirror of
https://github.com/Noratrieb/uwuwind.git
synced 2026-01-15 09:05:07 +01:00
eh_frame_hdr
This commit is contained in:
parent
37a2259f6f
commit
e3246ede0b
7 changed files with 103 additions and 99 deletions
13
src/lib.rs
13
src/lib.rs
|
|
@ -1,7 +1,7 @@
|
|||
#![no_std]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use core::sync::atomic::AtomicPtr;
|
||||
use core::{ffi, sync::atomic::AtomicPtr};
|
||||
|
||||
// Get the macros into our local prelude.
|
||||
#[macro_use]
|
||||
|
|
@ -15,12 +15,21 @@ mod identify;
|
|||
|
||||
mod walk;
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
struct Addr(*const ());
|
||||
|
||||
impl Addr {
|
||||
fn voidptr(self) -> *const ffi::c_void {
|
||||
self.0.cast()
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(nonstandard_style)]
|
||||
pub unsafe extern "C" fn _UnwindRaiseException(
|
||||
exception_object: *mut uw::_Unwind_Exception,
|
||||
) -> uw::_Unwind_Reason_Code {
|
||||
trace!("someone raised an exception with addr {exception_object:p}");
|
||||
let _di = crate::dwarf::dwarf_info(arch::get_rip() as _).unwrap();
|
||||
let _di = crate::dwarf::dwarf_info(arch::get_rip()).unwrap();
|
||||
crate::dwarf::uwutables(core::ptr::null());
|
||||
|
||||
stdext::abort();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue