misc changes
This commit is contained in:
parent
5ecb44d1e3
commit
8b06d29ed8
@ -7,8 +7,6 @@ edition = "2018"
|
||||
[dependencies]
|
||||
gimli = { version = "0.25.0", default-features = false, features = ["read"] }
|
||||
libc = "0.2"
|
||||
fallible-iterator = "0.1"
|
||||
log = "0.4"
|
||||
once_cell = "1.8"
|
||||
|
||||
[profile.release]
|
||||
|
@ -11,6 +11,13 @@ pub struct Context {
|
||||
pub fcw: usize,
|
||||
}
|
||||
|
||||
pub struct Arch;
|
||||
|
||||
impl Arch {
|
||||
pub const SP: Register = X86_64::RSP;
|
||||
pub const RA: Register = X86_64::RA;
|
||||
}
|
||||
|
||||
impl fmt::Debug for Context {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
let mut fmt = fmt.debug_struct("Context");
|
||||
@ -84,7 +91,6 @@ pub extern "C-unwind" fn save_context() -> Context {
|
||||
|
||||
#[naked]
|
||||
pub unsafe extern "C" fn restore_context(ctx: &Context) -> ! {
|
||||
// No need to save caller-saved registers here.
|
||||
asm!(
|
||||
"
|
||||
/* Restore stack */
|
||||
|
@ -4,6 +4,7 @@ mod registry;
|
||||
use crate::util::*;
|
||||
use gimli::{BaseAddresses, EhFrame, FrameDescriptionEntry};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct FDESearchResult {
|
||||
pub fde: FrameDescriptionEntry<StaticSlice>,
|
||||
pub bases: BaseAddresses,
|
||||
|
@ -1,3 +1,8 @@
|
||||
#![feature(c_unwind)]
|
||||
#![feature(naked_functions)]
|
||||
#![feature(asm)]
|
||||
#![allow(unused_unsafe)]
|
||||
|
||||
mod arch;
|
||||
mod find_fde;
|
||||
mod util;
|
||||
|
Loading…
Reference in New Issue
Block a user