Function stack_trace

Source
pub fn stack_trace<'a, R: Reader<Offset = usize>, M: MemoryAccess>(
    dwarf: &Dwarf<R>,
    debug_frame: &'a DebugFrame<R>,
    registers: Registers,
    memory: &mut M,
    cwd: &str,
) -> Result<Vec<StackFrame<R>>>
Expand description

Will preform a stack trace on the debugged target.

Description:

  • dwarf - A reference to gimli-rs Dwarf struct.
  • debug_frame - A reference to the DWARF section .debug_frame.
  • registers - A Registers struct which is used to read the register values.
  • memory - Used to read the memory of the debugged target.
  • cwd - The work directory of the debugged program.

This function will first virtually unwind the call stack. Then it will evaluate all the variables in each of the stack frames, and return a Vec of StackFrames.