IDA SDK

- Main Page
- Header Files
- Classes
- Modules

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
source_item_t Class Referenceabstract
Debugger functions » Source information providers

## Detailed Description

Describes a subdivision of source information.

Inherits qrefcnt_obj_t.

## Public Member Functions
virtual void idaapi | release ()=0
| Call this function to free source_item_t.
virtual source_file_iterator idaapi | get_source_files ()=0
| Get source files of the item.
virtual bool idaapi | get_name (qstring *buf) const =0
| Get name of the item.
virtual int idaapi | get_lnnum () const =0
| Get line number of the item.
virtual int idaapi | get_end_lnnum () const =0
| Get ending line number. More...
virtual int idaapi | get_colnum () const =0
| Get column number of the item. More...
virtual int idaapi | get_end_colnum () const =0
| Get ending column number. More...
virtual ea_t idaapi | get_ea () const =0
| Get starting address of the item.
virtual asize_t idaapi | get_size () const =0
| Get size of the item in bytes. More...
virtual bool idaapi | get_item_bounds (areaset_t *set) const =0
| Get item boundaries as a set of areas. More...
virtual source_item_ptr idaapi | get_parent (src_item_kind_t max_kind) const =0
| Get parent of the item. More...
virtual source_item_iterator idaapi | create_children_iterator ()=0
| Create an iterator to enumerate all children of the item.
virtual bool idaapi | get_hint (const eval_ctx_t *ctx, qstring *hint, int *nlines) const =0
| Calculate a string to display as a hint. More...
virtual bool idaapi | evaluate (const eval_ctx_t *ctx, idc_value_t *res, qstring *errbuf) const =0
| Evaluate item value (meaningful only for expression items). More...
virtual bool idaapi | equals (const source_item_t *other) const =0
| Do these two items have the same source?. More...
virtual bool idaapi | get_expr_type (qtype *, qtype *) const
| Deprecated - see get_expr_tinfo()
Old get_kind()
The following methods are deprecated - see get_kind()
virtual src_item_kind_t idaapi | get_item_kind () const
bool | is_stmt () const
bool | is_module () const
bool | is_func () const
bool | is_expr () const
bool | is_var () const
bool | is_stkvar () const
bool | is_regvar () const
bool | is_rrlvar () const
bool | is_sttvar () const
Old get_location()
The following methods are deprecated - see get_location()
virtual bool idaapi | get_stkvar_info (char *, size_t, uval_t *, ea_t) const
virtual bool idaapi | get_regvar_info (char *, size_t) const
virtual bool idaapi | get_rrlvar_info (char *, size_t, uval_t *) const
Getters (for modification)
The following functions can be used to extract the item information in order to modify it. For example, if the user wants to modify a variable we will find what exactly needs to be modified.
virtual src_item_kind_t idaapi | get_kind (const eval_ctx_t *) const
| Get item kind.
bool | is_stmt (const eval_ctx_t *ctx) const
| Does this source item represent a statement?
bool | is_module (const eval_ctx_t *ctx) const
| Does this source item represent a module?
bool | is_func (const eval_ctx_t *ctx) const
| Does this source item represent a function?
bool | is_expr (const eval_ctx_t *ctx) const
| Does this source item represent an expression?
bool | is_locvar (const eval_ctx_t *ctx) const
| Does this source item represent a stack, register, or register-relative local variable or parameter?
bool | is_sttvar (const eval_ctx_t *ctx) const
| Does this source item represent a static variable or code?
virtual srcinfo_provider_t *idaapi | get_provider (void) const =0
| Get source info provider. More...
virtual bool idaapi | get_location (argloc_t *, const eval_ctx_t *) const
| Get the location for this source item.
virtual bool idaapi | get_expr_tinfo (tinfo_t *tif) const =0
| Get expression type.
Public Member Functions inherited from qrefcnt_obj_t
| qrefcnt_obj_t (void)
| Constructor.

## Additional Inherited Members
Public Attributes inherited from qrefcnt_obj_t
int | refcnt
| counter

## Member Function Documentation

virtual int idaapi source_item_t::get_end_lnnum | ( |  | ) | const
| pure virtual

Get ending line number.

The returned line number is the next line after the expression

virtual int idaapi source_item_t::get_colnum | ( |  | ) | const
| pure virtual

Get column number of the item.

If unknown, return -1

virtual int idaapi source_item_t::get_end_colnum | ( |  | ) | const
| pure virtual

Get ending column number.

The returned column number is the next column after the expression. If unknown, return -1

virtual asize_t idaapi source_item_t::get_size | ( |  | ) | const
| pure virtual

Get size of the item in bytes.

If the item is fragmented, return size of the main fragment. if unknown, return 0. On error, return (asize_t) -1.

virtual bool idaapi source_item_t::get_item_bounds | ( | areaset_t * | set | ) | const
| pure virtual

Get item boundaries as a set of areas.

This function will be used to determine what breakpoints to set for stepping into/stepping over the item.

virtual source_item_ptr idaapi source_item_t::get_parent | ( | src_item_kind_t | max_kind | ) | const
| pure virtual

Get parent of the item.

Parameters

  max_kind | maximal source item kind we are interested in. for example, if max_kinds==SRCIT_STMT, we are not interested in expressions, only in the enclosing statement or function

virtual bool idaapi source_item_t::get_hint | ( | const eval_ctx_t * | ctx,
|  | qstring * | hint,
|  | int * | nlines
| ) |  | const
| pure virtual

Calculate a string to display as a hint.

Parameters

  ctx | execution context. NULL means missing context.
  hint | output buffer for the hint (may by multiline & with colors)
  nlines | number of important lines in the hint

virtual bool idaapi source_item_t::evaluate | ( | const eval_ctx_t * | ctx,
|  | idc_value_t * | res,
|  | qstring * | errbuf
| ) |  | const
| pure virtual

Evaluate item value (meaningful only for expression items).

Parameters

  ctx | execution context. NULL means missing context.
  res | buffer for the result (or exception if evaluation failed)
  errbuf | buffer for the error message

virtual bool idaapi source_item_t::equals | ( | const source_item_t * | other | ) | const
| pure virtual

Do these two items have the same source?.

Return values

  false | the source of the underlying data differs between the two items.
  true | when either the source of the underlying data is the same for the two items, or when such information is not available.

E.g., A DWARF implementation of source_item_t will return true if the two items are backed by DIEs that have the same file offset.

virtual srcinfo_provider_t* idaapi source_item_t::get_provider | ( | void |  | ) | const
| pure virtual

Get source info provider.

The instance shouldn't be freed or released after using

The documentation for this class was generated from the following file:

- dbg.hpp