You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use gimli::{UnwindSection,UnwindTable,UnwindTableRow,EhFrame,BaseAddresses,UninitializedUnwindContext,Pointer,Reader,EndianSlice,NativeEndian,CfaRule,RegisterRule,EhFrameHdr,ParsedEhFrameHdr};
9
+
use gimli::{UnwindSection,UnwindTable,UnwindTableRow,EhFrame,BaseAddresses,UninitializedUnwindContext,Pointer,Reader,EndianSlice,NativeEndian,CfaRule,RegisterRule,EhFrameHdr,ParsedEhFrameHdr,X86_64};
9
10
use fallible_iterator::FallibleIterator;
10
11
11
12
mod registers;
12
13
mod find_cfi;
13
14
mod range;
14
15
pubmod libunwind_shim;
15
16
pubmod glue;
16
-
use registers::{Registers,DwarfRegister};
17
+
use registers::Registers;
17
18
use find_cfi::EhRef;
18
19
19
20
@@ -28,7 +29,6 @@ pub struct StackFrame {
28
29
personality:Option<u64>,
29
30
lsda:Option<u64>,
30
31
initial_address:u64,
31
-
pubobject_base:u64,// FIXME hack, remove this
32
32
}
33
33
34
34
pubtraitUnwinder:Default{
@@ -53,20 +53,23 @@ impl Default for DwarfUnwinder {
53
53
fndefault() -> DwarfUnwinder{
54
54
let cfi = find_cfi::find_cfi_sections().into_iter().map(|er| {
55
55
unsafe{
56
-
let bases = BaseAddresses::default().set_cfi(er.cfi.start);
56
+
// TODO: set_got()
57
+
let bases = BaseAddresses::default()
58
+
.set_eh_frame_hdr(er.eh_frame_hdr.start)
59
+
.set_text(er.text.start);
57
60
58
-
let eh_frame_hdr:&'static[u8] = std::slice::from_raw_parts(er.cfi.startas*constu8, er.cfi.len()asusize);
61
+
let eh_frame_hdr:&'static[u8] = std::slice::from_raw_parts(er.eh_frame_hdr.startas*constu8, er.eh_frame_hdr.len()asusize);
59
62
60
63
let eh_frame_hdr = EhFrameHdr::new(eh_frame_hdr,NativeEndian).parse(&bases,8).unwrap();
0 commit comments