Trait ExecFile

Source
pub trait ExecFile: Target {
    // Required method
    fn get_exec_file(
        &self,
        pid: Option<Pid>,
        offset: u64,
        length: usize,
        buf: &mut [u8],
    ) -> TargetResult<usize, Self>;
}
Expand description

Target Extension - Provide current exec-file.

NOTE: this extension is primarily intended to be used alongside the Host I/O Extensions, which enables the GDB client to read the executable file directly from the target

Required Methods§

Source

fn get_exec_file( &self, pid: Option<Pid>, offset: u64, length: usize, buf: &mut [u8], ) -> TargetResult<usize, Self>

Get full absolute path of the file that was executed to create process pid running on the remote system.

If pid is None, return the filename corresponding to the currently executing process.

Return the number of bytes written into buf (which may be less than length).

If offset is greater than the length of the underlying data, return Ok(0).

Implementors§