pub trait Process: Send {
Show 24 methods fn state(&mut self) -> ProcessState;
fn module_address_list_callback(
        &mut self,
        target_arch: Option<&ArchitectureIdent>,
        callback: ModuleAddressCallback<'_>
    ) -> Result<()>;
fn module_by_address(
        &mut self,
        address: Address,
        architecture: ArchitectureIdent
    ) -> Result<ModuleInfo>;
fn primary_module_address(&mut self) -> Result<Address>;
fn module_import_list_callback(
        &mut self,
        info: &ModuleInfo,
        callback: ImportCallback<'_>
    ) -> Result<()>;
fn module_export_list_callback(
        &mut self,
        info: &ModuleInfo,
        callback: ExportCallback<'_>
    ) -> Result<()>;
fn module_section_list_callback(
        &mut self,
        info: &ModuleInfo,
        callback: SectionCallback<'_>
    ) -> Result<()>;
fn info(&self) -> &ProcessInfo;
fn mapped_mem_range(
        &mut self,
        gap_size: imem,
        start: Address,
        end: Address,
        out: MemoryRangeCallback<'_>
    ); fn module_list_callback(
        &mut self,
        target_arch: Option<&ArchitectureIdent>,
        callback: ModuleInfoCallback<'_>
    ) -> Result<()> { ... }
fn module_by_name_arch(
        &mut self,
        name: &str,
        architecture: Option<&ArchitectureIdent>
    ) -> Result<ModuleInfo> { ... }
fn module_by_name(&mut self, name: &str) -> Result<ModuleInfo> { ... }
fn module_list_arch(
        &mut self,
        target_arch: Option<&ArchitectureIdent>
    ) -> Result<Vec<ModuleInfo>> { ... }
fn module_list(&mut self) -> Result<Vec<ModuleInfo>> { ... }
fn primary_module(&mut self) -> Result<ModuleInfo> { ... }
fn module_import_list(
        &mut self,
        info: &ModuleInfo
    ) -> Result<Vec<ImportInfo>> { ... }
fn module_export_list(
        &mut self,
        info: &ModuleInfo
    ) -> Result<Vec<ExportInfo>> { ... }
fn module_section_list(
        &mut self,
        info: &ModuleInfo
    ) -> Result<Vec<SectionInfo>> { ... }
fn module_import_by_name(
        &mut self,
        info: &ModuleInfo,
        name: &str
    ) -> Result<ImportInfo> { ... }
fn module_export_by_name(
        &mut self,
        info: &ModuleInfo,
        name: &str
    ) -> Result<ExportInfo> { ... }
fn module_section_by_name(
        &mut self,
        info: &ModuleInfo,
        name: &str
    ) -> Result<SectionInfo> { ... }
fn mapped_mem_range_vec(
        &mut self,
        gap_size: imem,
        start: Address,
        end: Address
    ) -> Vec<MemoryRange>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
{ ... }
fn mapped_mem(&mut self, gap_size: imem, out: MemoryRangeCallback<'_>) { ... }
fn mapped_mem_vec(&mut self, gap_size: imem) -> Vec<MemoryRange>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
{ ... }
}
Expand description

Provides all actions on processes

This trait provides a lot of typical functionality for processes, such as memory access, module lists, and basic information.

Future expansions could include threads, keyboard input, and more.

Required methods

Retrieves the state of the process

Walks the process’ module list and calls the provided callback for each module structure address

Arguments
  • target_arch - sets which architecture to retrieve the modules for (if emulated). Choose between Some(ProcessInfo::sys_arch()), and Some(ProcessInfo::proc_arch()). None for all.
  • callback - where to pass each matching module to. This is an opaque callback.

Retrieves a module by its structure address and architecture

Arguments
  • address - address where module’s information resides in
  • architecture - architecture of the module. Should be either ProcessInfo::proc_arch, or ProcessInfo::sys_arch.

Retrieves address of the primary module structure of the process

This will generally be for the initial executable that was run

Retrieves a list of all imports of a given module

Retrieves a list of all exports of a given module

Retrieves a list of all sections of a given module

Retrieves the process info

Provided methods

Walks the process’ module list and calls the provided callback for each module

Arguments
  • target_arch - sets which architecture to retrieve the modules for (if emulated). Choose between Some(ProcessInfo::sys_arch()), and Some(ProcessInfo::proc_arch()). None for all.
  • callback - where to pass each matching module to. This is an opaque callback.

Finds a process module by its name under specified architecture

This function can be useful for quickly accessing a specific module

Arguments
  • name - name of the module to find
  • architecture - architecture of the module. Should be either ProcessInfo::proc_arch, or ProcessInfo::sys_arch, or None for both.

Finds any architecture process module by its name

This function can be useful for quickly accessing a specific module

Arguments
  • name - name of the module to find

Retrieves a module list for the process

Arguments
  • target_arch - sets which architecture to retrieve the modules for (if emulated). Choose between Some(ProcessInfo::sys_arch()), and Some(ProcessInfo::proc_arch()). None for all.

Retrieves a module list for the process

This is equivalent to Process::module_list_arch(None)

Retrieves information for the primary module of the process

This will generally be the initial executable that was run

Retrieves a list of all imports of a given module

Retrieves a list of all exports of a given module

Retrieves a list of all sections of a given module

Finds a single import of a given module by its name

Finds a single export of a given module by its name

Finds a single section of a given module by its name

Implementors