objdiff_core::arch

Trait ObjArch

source
pub trait ObjArch: Send + Sync {
    // Required methods
    fn process_code(
        &self,
        address: u64,
        code: &[u8],
        section_index: usize,
        relocations: &[ObjReloc],
        line_info: &BTreeMap<u64, u32>,
        config: &DiffObjConfig,
    ) -> Result<ProcessCodeResult>;
    fn implcit_addend(
        &self,
        file: &File<'_>,
        section: &ObjSection,
        address: u64,
        reloc: &Relocation,
    ) -> Result<i64>;
    fn display_reloc(&self, flags: RelocationFlags) -> Cow<'static, str>;

    // Provided methods
    fn demangle(&self, _name: &str) -> Option<String> { ... }
    fn symbol_address(&self, symbol: &Symbol<'_, '_>) -> u64 { ... }
    fn guess_data_type(&self, _instruction: &ObjIns) -> Option<DataType> { ... }
    fn display_data_type(&self, _ty: DataType, bytes: &[u8]) -> Option<String> { ... }
    fn ppc(&self) -> Option<&ObjArchPpc> { ... }
}

Required Methods§

source

fn process_code( &self, address: u64, code: &[u8], section_index: usize, relocations: &[ObjReloc], line_info: &BTreeMap<u64, u32>, config: &DiffObjConfig, ) -> Result<ProcessCodeResult>

source

fn implcit_addend( &self, file: &File<'_>, section: &ObjSection, address: u64, reloc: &Relocation, ) -> Result<i64>

source

fn display_reloc(&self, flags: RelocationFlags) -> Cow<'static, str>

Provided Methods§

source

fn demangle(&self, _name: &str) -> Option<String>

source

fn symbol_address(&self, symbol: &Symbol<'_, '_>) -> u64

source

fn guess_data_type(&self, _instruction: &ObjIns) -> Option<DataType>

source

fn display_data_type(&self, _ty: DataType, bytes: &[u8]) -> Option<String>

source

fn ppc(&self) -> Option<&ObjArchPpc>

Implementors§