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§
Sourcefn on_breakpoint(
&self,
pc: RelocatedAddress,
num: u32,
place: Option<PlaceDescriptor<'_>>,
function: Option<&FunctionDie>,
) -> Result<()>
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 reachednum: breakpoint numberplace: stop place informationfunction: function debug information entry
Sourcefn 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_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 reachednum: breakpoint numberplace: breakpoint numbercondition: reason of a watchpoint activationdqe_string: stringified data query expression (if exist)old_value: previous expression or mem location valuenew_value: current expression or mem location valueend_of_scope: true if watchpoint activated cause end of scope is reached
Sourcefn on_step(
&self,
pc: RelocatedAddress,
place: Option<PlaceDescriptor<'_>>,
function: Option<&FunctionDie>,
) -> Result<()>
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 reachedplace: stop place informationfunction: function debug information entry
Sourcefn on_async_step(
&self,
pc: RelocatedAddress,
place: Option<PlaceDescriptor<'_>>,
function: Option<&FunctionDie>,
task_id: u64,
task_completed: bool,
) -> Result<()>
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 reachedplace: stop place informationfunction: function debug information entrytask_id: asynchronous task idtask_completed: true if task is already completed