dwarfcore.plugins.dwarf_trace module

class dwarfcore.plugins.dwarf_trace.DwarfTrace(dwarfcore: dwarfcore.dwarfcore.DwarfCore)

Bases: manticore.core.plugin.Plugin

Print more detailed information about which function is currently being executed in our trace.

Parameters

dwarfcore (dwarfcore.dwarfcore.DwarfCore) –

did_execute_instruction_callback(state: manticore.native.state.State, pc: Union[int, manticore.core.smtlib.expression.Expression], _target_pc: Union[int, manticore.core.smtlib.expression.Expression], _instruction: manticore.native.cpu.disasm.Instruction)

Manticore callback that will determine whether Manticore is executing in a new function.

If it is, it will add it to the trace list.

Parameters
  • state (manticore.native.state.State) –

  • pc (Union[int, manticore.core.smtlib.expression.Expression]) –

  • _target_pc (Union[int, manticore.core.smtlib.expression.Expression]) –

  • _instruction (manticore.native.cpu.disasm.Instruction) –

get_trace(state: manticore.native.state.State)

Return the collected trace of a specific Manticore State.

Returns

List of functions executed

Parameters

state (manticore.native.state.State) –

manticore
trace_file = 'dwarf_trace'
will_terminate_state_callback(state: manticore.native.state.State, _ex)

Manticore callback on State termination.

This will write the collected function trace to a file in Manticore’s workspace location.

Parameters

state (manticore.native.state.State) –

class dwarfcore.plugins.dwarf_trace.TraceFunction(function, address)

Bases: tuple

Parameters
address: dwarfcore.dwarfcore.ManticoreAddress

Alias for field number 1

function: str

Alias for field number 0