Latest available version: IDA and decompilers v8.4.240320sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon

Plugins can use these functions to implement a custom tracing engine. More...

Modules

 Step trace options
 Flags returned by get_step_trace_options()
 

Macros

#define IT_LOG_SAME_IP   0x01
 specific options for instruction tracing (see set_insn_trace_options()) More...
 
#define FT_LOG_RET   0x01
 specific options for function tracing (see set_func_trace_options()) More...
 
#define BT_LOG_INSTS   0x01
 specific options for basic block tracing (see set_bblk_trace_options()) More...
 

Functions

bool idaapi is_step_trace_enabled (void)
 Get current state of step tracing. More...
 
int idaapi get_step_trace_options (void)
 Get current step tracing options. More...
 
void idaapi set_step_trace_options (int options)
 Modify step tracing options. More...
 
void idaapi request_set_step_trace_options (int options)
 Post a set_step_trace_options() request.
 

Enable/Disable step tracing

Enable or disable the step tracing

TypeSynchronous function - available as request
Notificationnone (synchronous function)
Parameters
enable
  • 1 : enable step tracing
  • 0 : disable step tracing
  • -1 : temporarily disable step tracing (trace-over breakpoints are conserved: these could re-enable step tracing later)
bool idaapi enable_step_trace (int enable=1)
 
bool disable_step_trace (void)
 
bool idaapi request_enable_step_trace (int enable=1)
 
bool request_disable_step_trace (void)
 

Detailed Description

Plugins can use these functions to implement a custom tracing engine.

When enabled, IDA uses single-stepping feature of the debugger and generates a dbg_trace notification after each step in the current thread. Tracing buffer is not maintained in this mode (you need to use one of the higher level tracing types for it)

Macro Definition Documentation

◆ IT_LOG_SAME_IP

#define IT_LOG_SAME_IP   0x01

specific options for instruction tracing (see set_insn_trace_options())

instruction tracing will log new instructions even when IP doesn't change

◆ FT_LOG_RET

#define FT_LOG_RET   0x01

specific options for function tracing (see set_func_trace_options())

function tracing will log returning instructions

◆ BT_LOG_INSTS

#define BT_LOG_INSTS   0x01

specific options for basic block tracing (see set_bblk_trace_options())

log all instructions in the current basic block

Function Documentation

◆ is_step_trace_enabled()

bool idaapi is_step_trace_enabled ( void  )
inline

Get current state of step tracing.

TypeSynchronous function
Notificationnone (synchronous function)

◆ get_step_trace_options()

int idaapi get_step_trace_options ( void  )
inline

Get current step tracing options.

TypeSynchronous function
Notificationnone (synchronous function)
Returns
Step trace options

◆ set_step_trace_options()

void idaapi set_step_trace_options ( int  options)
inline

Modify step tracing options.

TypeSynchronous function - available as request
Notificationnone (synchronous function)