IDA SDK
Public Attributes | Public Member Functions | List of all members
srcinfo_provider_t Class Referenceabstract

Detailed Description

Describes the mechanism used to retrieve source file information.

Public Attributes

size_t cb
 size of this class
 
int flags
 Source info provider property bits
 
const char * name
 internal (unique) name of srcinfo provider
 
const char * display_name
 external (displayable) name of srcinfo provider
 

Public Member Functions

 srcinfo_provider_t (const char *_name, const char *_display_name, int _flags=0)
 
bool is_decompiler (void) const
 Is the source info provider a decompiler?
 
bool is_enabled (void) const
 Has the provider been enabled by the user?
 
bool is_active (void) const
 Is the provider willing to work with the current idb?
 
uint8 get_version () const
 See SPF_VERSION_MASK.
 
virtual bool idaapi enable_provider (bool enable)=0
 Enable or disable the provider. More...
 
virtual const char *idaapi set_options (const char *keyword, int value_type, const void *value)=0
 Configure srcinfo provider. More...
 
virtual void idaapi add_module (const char *path, ea_t base, asize_t size)=0
 Inform the provider that a module got loaded. More...
 
virtual void idaapi del_module (ea_t base)=0
 Inform the provider that a module got unloaded.
 
virtual void idaapi get_ready (void)=0
 Inform the provider that we will request for information now. More...
 
virtual int idaapi get_change_flags (void)=0
 Ask the provider if the source information has changed and the screen should be refreshed. More...
 
virtual source_item_iterator idaapi find_source_items (ea_t ea, asize_t size, src_item_kind_t level, bool may_decompile)=0
 Locate source item by address. More...
 
virtual source_item_iterator idaapi find_source_items (source_file_t *sf, int lnnum, int colnum=0)=0
 Locate source item by a position in a source file. More...
 
virtual source_file_iterator idaapi create_file_iterator (const char *filename=NULL)=0
 Create iterators to enumerate files. More...
 
virtual source_item_iterator idaapi create_item_iterator (const source_file_t *sf)=0
 Create iterators to enumerate items.
 
virtual bool idaapi apply_module_info (const char *)
 Apply the debug information (types, functions, globals) from the module whose path is 'path', to the IDB.
 
virtual source_item_ptr idaapi find_static_item (const char *name, ea_t ea)=0
 Locate a global variable by its name. More...
 

Member Function Documentation

virtual bool idaapi srcinfo_provider_t::enable_provider ( bool  enable)
pure virtual

Enable or disable the provider.

If the provider fails to initialize, it returns false, otherwise true

virtual const char* idaapi srcinfo_provider_t::set_options ( const char *  keyword,
int  value_type,
const void *  value 
)
pure virtual

Configure srcinfo provider.

See the description of ::set_options_t

virtual void idaapi srcinfo_provider_t::add_module ( const char *  path,
ea_t  base,
asize_t  size 
)
pure virtual

Inform the provider that a module got loaded.

The provider is not required to read the module information immediately; it may postpone it until really required.

virtual void idaapi srcinfo_provider_t::get_ready ( void  )
pure virtual

Inform the provider that we will request for information now.

This function must be called before calling all functions below. probably it will be called when the process gets suspended.

virtual int idaapi srcinfo_provider_t::get_change_flags ( void  )
pure virtual

Ask the provider if the source information has changed and the screen should be refreshed.

UI will call this function periodically (when idle). if it returns a flag value other than SPCH_NONE, then the source information must be refreshed.

virtual source_item_iterator idaapi srcinfo_provider_t::find_source_items ( ea_t  ea,
asize_t  size,
src_item_kind_t  level,
bool  may_decompile 
)
pure virtual

Locate source item by address.

The kernel will inquire all registered providers and use the best reply.

Parameters
ealinear address
sizesize of the item
levelthe desired item level:
may_decompilemeaningful only for the decompiler. if set to false and the function at 'ea' has not been decompiled yet, fail.
virtual source_item_iterator idaapi srcinfo_provider_t::find_source_items ( source_file_t sf,
int  lnnum,
int  colnum = 0 
)
pure virtual

Locate source item by a position in a source file.

if colnum == 0, return the statement that starts at the specified line. if lnnum == 0, return information about all lines (colnum is ignored in this case)

virtual source_file_iterator idaapi srcinfo_provider_t::create_file_iterator ( const char *  filename = NULL)
pure virtual

Create iterators to enumerate files.

Parameters
filenamename of the source file to enumerate
virtual source_item_ptr idaapi srcinfo_provider_t::find_static_item ( const char *  name,
ea_t  ea 
)
pure virtual

Locate a global variable by its name.

Parameters
nameThe variable name
eaThe current address
Returns
the source item, or NULL

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