IDA C++ SDK 9.2
Loading...
Searching...
No Matches
srcinfo_provider_t Class Referenceabstract

Describes the mechanism used to retrieve source file information. More...

#include <dbg.hpp>

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.
virtual const char *idaapi set_options (const char *keyword, int value_type, const void *value)=0
 Configure srcinfo provider.
virtual void idaapi add_module (const char *path, ea_t base, asize_t size)=0
 Inform the provider that a module got loaded.
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.
virtual int idaapi get_change_flags (void)=0
 Ask the provider if the source information has changed and the screen should be refreshed.
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.
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.
virtual source_file_iterator idaapi create_file_iterator (const char *filename=nullptr)=0
 Create iterators to enumerate files.
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.

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

Detailed Description

Describes the mechanism used to retrieve source file information.

Constructor & Destructor Documentation

◆ srcinfo_provider_t()

srcinfo_provider_t::srcinfo_provider_t ( const char * _name,
const char * _display_name,
int _flags = 0 )
inline

Member Function Documentation

◆ is_decompiler()

bool srcinfo_provider_t::is_decompiler ( void ) const
inline

Is the source info provider a decompiler?

◆ is_enabled()

bool srcinfo_provider_t::is_enabled ( void ) const
inline

Has the provider been enabled by the user?

◆ is_active()

bool srcinfo_provider_t::is_active ( void ) const
inline

Is the provider willing to work with the current idb?

◆ get_version()

uint8 srcinfo_provider_t::get_version ( ) const
inline

See #SPF_VERSION_MASK.

◆ enable_provider()

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

◆ set_options()

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

Configure srcinfo provider.

Parameters
keywordkeyword encountered in IDA.CFG/user config file. if nullptr, then an interactive dialog form should be displayed
value_typetype of value of the keyword - one of Option value types
valuepointer to value
Returns
one of Option result codes, otherwise a pointer to an error message

◆ add_module()

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.

◆ del_module()

virtual void idaapi srcinfo_provider_t::del_module ( ea_t base)
pure virtual

Inform the provider that a module got unloaded.

◆ get_ready()

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.

◆ get_change_flags()

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.

◆ find_source_items() [1/2]

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.

◆ find_source_items() [2/2]

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)

◆ create_file_iterator()

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

Create iterators to enumerate files.

Parameters
filenamename of the source file to enumerate

◆ create_item_iterator()

virtual source_item_iterator idaapi srcinfo_provider_t::create_item_iterator ( const source_file_t * sf)
pure virtual

Create iterators to enumerate items.

◆ apply_module_info()

virtual bool idaapi srcinfo_provider_t::apply_module_info ( const char * )
inlinevirtual

Apply the debug information (types, functions, globals) from the module whose path is 'path', to the IDB.

◆ find_static_item()

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 nullptr

Member Data Documentation

◆ cb

size_t srcinfo_provider_t::cb

size of this class

◆ flags

int srcinfo_provider_t::flags

◆ name

const char* srcinfo_provider_t::name

internal (unique) name of srcinfo provider

◆ display_name

const char* srcinfo_provider_t::display_name

external (displayable) name of srcinfo provider


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