| IDA SDK

Classes | Macros | Typedefs | Enumerations | Functions
Source information providers
Debugger functions

## Detailed Description

These providers supply information about the source files and lines to the source level debugger.

Note
  objects that inherit from qrefcnt_obj_t must be freed using the release() method. do not use the 'delete' operator! See description for qrefcnt_obj_t::release()

Currently this interface is not frozen and may change. We will freeze it once we settle things down.

## Classes
class | eval_ctx_t
| Execution context. More...
class | source_file_t
| Describes a source file. More...
class | source_item_t
| Describes a subdivision of source information. More...
class | srcinfo_provider_t
| Describes the mechanism used to retrieve source file information. More...

## Macros
#define | SRCDBG_PROV_VERSION 4

## Typedefs
typedef qrefcnt_t< source_item_t > | source_item_ptr
| Maintain a reference count for source items.
typedef qiterator< source_item_ptr > | _source_item_iterator
| Iterator for source items.
typedef qrefcnt_t< _source_item_iterator > | source_item_iterator
| Maintain a reference count for source item iterators.
typedef qvector< source_item_ptr > | source_items_t
| Vector of source items.
typedef qrefcnt_t< source_file_t > | source_file_ptr
| Maintain a reference count for source file objects.
typedef qiterator< source_file_ptr > | _source_file_iterator
| Iterator for source files.
typedef qrefcnt_t< _source_file_iterator > | source_file_iterator
| Maintain a reference count for source file iterators.

## Enumerations
enum | src_item_kind_t { SRCIT_NONE , SRCIT_MODULE , SRCIT_FUNC , SRCIT_STMT , SRCIT_EXPR , SRCIT_STTVAR , SRCIT_LOCVAR }
| Kinds of source items. More...

## Functions
bool idaapi | register_srcinfo_provider (srcinfo_provider_t *sp)
| Register a source information provider. More...
bool idaapi | unregister_srcinfo_provider (srcinfo_provider_t *sp)
| Unregister a source information provider. More...
source_view_t * | create_source_viewer (TWidget **out_ccv, TWidget *parent, TWidget *custview, source_file_ptr sf, strvec_t *lines, int lnnum, int colnum, int flags)
| Create a source code view.
idaman bool ida_export | get_dbg_byte (uint32 *out, ea_t ea)
| Get one byte of the debugged process memory. More...
idaman bool ida_export | put_dbg_byte (ea_t ea, uint32 x)
| Change one byte of the debugged process memory. More...

## Enumeration Type Documentation

## ◆ src_item_kind_t

enum src_item_kind_t

Kinds of source items.

Source items are organized into trees. Each tree starts with a MODULE. Each MODULE consists of FUNC and STTVAR global items. Each FUNC consists of STMTs (statements). Each STMT contains some EXPRs (expressions).

Enumerator
SRCIT_NONE | unknown
SRCIT_MODULE | module
SRCIT_FUNC | function
SRCIT_STMT | a statement (if/while/for...)
SRCIT_EXPR | an expression (a+b*c)
SRCIT_STTVAR | static variable/code
SRCIT_LOCVAR | a stack, register, or register-relative local variable or parameter

## Function Documentation

## ◆ register_srcinfo_provider()

bool idaapi register_srcinfo_provider | ( | srcinfo_provider_t * | sp | ) |
| inline

Register a source information provider.

Source information providers will call this function to register themselves with IDA kernel. Returns false: a service provider with this name already exists.

## ◆ unregister_srcinfo_provider()

bool idaapi unregister_srcinfo_provider | ( | srcinfo_provider_t * | sp | ) |
| inline

Unregister a source information provider.

Returns false: no such provider.

## ◆ get_dbg_byte()

idaman bool ida_export get_dbg_byte | ( | uint32 * | out,
|  | ea_t | ea
| ) |  |

Get one byte of the debugged process memory.

Parameters

  out | pointer to byte value
  ea | linear address

Returns
  true success
  false address inaccessible or debugger not running

## ◆ put_dbg_byte()

idaman bool ida_export put_dbg_byte | ( | ea_t | ea,
|  | uint32 | x
| ) |  |

Change one byte of the debugged process memory.

Parameters

  ea | linear address
  x | byte value

Returns
  true if the process memory has been modified