IDA SDK
Functions

Detailed Description

Inspect/Manipulate registers for debugged process.

The debugger structure defines a set of hardware registers in debugger_t::registers IDA also recognizes register names for each defined bit in bit registers. You can use all these names to set or get a register value.

For example, with the x86 Userland Win32 debugger you can use register names like:

Functions

bool idaapi get_reg_val (const char *regname, regval_t *regval)
 Read a register value from the current thread. More...
 
bool get_reg_val (const char *regname, uint64 *ival)
 Get register value as an unsigned 64-bit int.
 
bool idaapi get_sp_val (ea_t *out_spval)
 Get value of the SP register for the current thread. More...
 
bool idaapi get_ip_val (ea_t *out_ipval)
 Get value of the IP (program counter) register for the current thread. More...
 
bool idaapi set_reg_val (const char *regname, const regval_t *regval)
 Write a register value to the current thread. More...
 
bool idaapi request_set_reg_val (const char *regname, const regval_t *regval)
 Post a set_reg_val() request.
 
bool set_reg_val (const char *regname, uint64 ival)
 Write a register value to the current thread.
 
bool idaapi is_reg_integer (const char *regname)
 Does a register contain an integer value? More...
 
bool idaapi is_reg_float (const char *regname)
 Does a register contain a floating point value? More...
 
bool idaapi is_reg_custom (const char *regname)
 Does a register contain a value of a custom data type? More...
 

Function Documentation

bool idaapi get_reg_val ( const char *  regname,
regval_t regval 
)
inline

Read a register value from the current thread.

TypeSynchronous function
Notificationnone (synchronous function)
bool idaapi get_sp_val ( ea_t out_spval)
inline

Get value of the SP register for the current thread.

Requires a suspended debugger.

bool idaapi get_ip_val ( ea_t out_ipval)
inline

Get value of the IP (program counter) register for the current thread.

Requires a suspended debugger.

bool idaapi set_reg_val ( const char *  regname,
const regval_t regval 
)
inline

Write a register value to the current thread.

TypeSynchronous function - available as Request
Notificationnone (synchronous function)
bool idaapi is_reg_integer ( const char *  regname)
inline

Does a register contain an integer value?

TypeSynchronous function
Notificationnone (synchronous function)
bool idaapi is_reg_float ( const char *  regname)
inline

Does a register contain a floating point value?

TypeSynchronous function
Notificationnone (synchronous function)
bool idaapi is_reg_custom ( const char *  regname)
inline

Does a register contain a value of a custom data type?

TypeSynchronous function
Notificationnone (synchronous function)