automatic_steps

summary: programmatically drive a debugging session

description:

Start a debugging session, step through the first five instructions. Each instruction is disassembled after execution.

level: advanced

Attributes

debughook

ep

Classes

MyDbgHook

Own debug hook class that implementd the callback functions

Module Contents

class automatic_steps.MyDbgHook

Bases: ida_dbg.DBG_Hooks

Own debug hook class that implementd the callback functions

steps = 0
log(msg)
dbg_process_start(pid, tid, ea, name, base, size)
dbg_process_exit(pid, tid, ea, code)
dbg_library_unload(pid, tid, ea, info)
dbg_process_attach(pid, tid, ea, name, base, size)
dbg_process_detach(pid, tid, ea)
dbg_library_load(pid, tid, ea, name, base, size)
dbg_bpt(tid, ea)

A user defined breakpoint was reached.

Parameters:
  • tid – (thid_t)

  • bptea – (::ea_t)

dbg_suspend_process()

The process is now suspended.

dbg_exception(pid, tid, ea, exc_code, exc_can_cont, exc_ea, exc_info)
dbg_trace(tid, ea)

A step occurred (one instruction was executed). This event notification is only generated if step tracing is enabled.

Parameters:
  • tid – (thid_t) thread ID

  • ip – (::ea_t) current instruction pointer. usually points after the executed instruction

Returns:

1: do not log this trace event

Returns:

0: log it

dbg_step_into()
dbg_run_to(pid, tid=0, ea=0)
dbg_step_over()
automatic_steps.debughook
automatic_steps.ep