EventHook

Trait EventHook 

Source
pub trait EventHook {
    // Required methods
    fn on_breakpoint(
        &self,
        pc: RelocatedAddress,
        num: u32,
        place: Option<PlaceDescriptor<'_>>,
        function: Option<&FunctionDie>,
    ) -> Result<()>;
    fn on_watchpoint(
        &self,
        pc: RelocatedAddress,
        num: u32,
        place: Option<PlaceDescriptor<'_>>,
        condition: BreakCondition,
        dqe_string: Option<&str>,
        old_value: Option<&Value>,
        new_value: Option<&Value>,
        end_of_scope: bool,
    ) -> Result<()>;
    fn on_step(
        &self,
        pc: RelocatedAddress,
        place: Option<PlaceDescriptor<'_>>,
        function: Option<&FunctionDie>,
    ) -> Result<()>;
    fn on_async_step(
        &self,
        pc: RelocatedAddress,
        place: Option<PlaceDescriptor<'_>>,
        function: Option<&FunctionDie>,
        task_id: u64,
        task_completed: bool,
    ) -> Result<()>;
    fn on_signal(&self, signal: Signal);
    fn on_exit(&self, code: i32);
    fn on_process_install(&self, pid: Pid, object: Option<&File<'_>>);
}
Expand description

Trait for the reverse interaction between the debugger and the user interface.

Required Methods§

Source

fn on_breakpoint( &self, pc: RelocatedAddress, num: u32, place: Option<PlaceDescriptor<'_>>, function: Option<&FunctionDie>, ) -> Result<()>

Called when user defined breakpoint is reached.

§Arguments
  • pc: address of instruction where breakpoint is reached
  • num: breakpoint number
  • place: stop place information
  • function: function debug information entry
Source

fn on_watchpoint( &self, pc: RelocatedAddress, num: u32, place: Option<PlaceDescriptor<'_>>, condition: BreakCondition, dqe_string: Option<&str>, old_value: Option<&Value>, new_value: Option<&Value>, end_of_scope: bool, ) -> Result<()>

Called when watchpoint is activated.

§Arguments
  • pc: address of instruction where breakpoint is reached
  • num: breakpoint number
  • place: breakpoint number
  • condition: reason of a watchpoint activation
  • dqe_string: stringified data query expression (if exist)
  • old_value: previous expression or mem location value
  • new_value: current expression or mem location value
  • end_of_scope: true if watchpoint activated cause end of scope is reached
Source

fn on_step( &self, pc: RelocatedAddress, place: Option<PlaceDescriptor<'_>>, function: Option<&FunctionDie>, ) -> Result<()>

Called when one of step commands is done.

§Arguments
  • pc: address of instruction where breakpoint is reached
  • place: stop place information
  • function: function debug information entry
Source

fn on_async_step( &self, pc: RelocatedAddress, place: Option<PlaceDescriptor<'_>>, function: Option<&FunctionDie>, task_id: u64, task_completed: bool, ) -> Result<()>

Called when one of async step commands is done.

§Arguments
  • pc: address of instruction where breakpoint is reached
  • place: stop place information
  • function: function debug information entry
  • task_id: asynchronous task id
  • task_completed: true if task is already completed
Source

fn on_signal(&self, signal: Signal)

Called when debugee receive an OS signal. Debugee is in signal-stop at this moment.

§Arguments
  • signal: received OS signal
Source

fn on_exit(&self, code: i32)

Called right after debugee exit.

§Arguments
  • code: exit code
Source

fn on_process_install(&self, pid: Pid, object: Option<&File<'_>>)

Called single time for each debugee process (on start or after reinstall).

§Arguments
  • pid: debugee process pid

Implementors§