Function trace

Source
pub fn trace<'data, P: Platform<'data>>(
    device_memory: DeviceMemory<'_, P::Word>,
    elf_data: &'data [u8],
) -> Result<Vec<Frame<P::Word>>, TraceError>
where <P::Word as Numeric>::Bytes: BitView<Store = u8>,
Expand description

Create the stacktrace for the given platform.

  • device_memory: All the captured memory of the device. It is not necessary to include any data that is present in the elf file because that will automatically be added. It is required to have a decent chunk of the stack present. If not all of the stack is present, then eventually the tracing procedure will find a corrupt frame. The standard set of registers is also required to be present.
  • elf_data: The raw bytes of the elf file. This must be the exact same elf file as the one the device was running. Even a recompilation of the exact same code can change the debug info.