DebugInfo

Detailed Description

Classes

struct  BinaryNinja::DebugFunctionInfo
 
class  BinaryNinja::DebugInfo
 
class  BinaryNinja::DebugInfoParser
 
class  BinaryNinja::CustomDebugInfoParser
 

Class Documentation

◆ BinaryNinja::DebugFunctionInfo

struct BinaryNinja::DebugFunctionInfo

Public Member Functions

 DebugFunctionInfo (std::string shortName, std::string fullName, std::string rawName, uint64_t address, Ref< Type > type, Ref< Platform > platform, const std::vector< std::string > &components)
 

Public Attributes

std::string shortName
 
std::string fullName
 
std::string rawName
 
uint64_t address
 
Ref< Typetype
 
Ref< Platformplatform
 
std::vector< std::string > components
 

Constructor & Destructor Documentation

◆ DebugFunctionInfo()

BinaryNinja::DebugFunctionInfo::DebugFunctionInfo ( std::string  shortName,
std::string  fullName,
std::string  rawName,
uint64_t  address,
Ref< Type type,
Ref< Platform platform,
const std::vector< std::string > &  components 
)
inline

Member Data Documentation

◆ shortName

std::string BinaryNinja::DebugFunctionInfo::shortName

◆ fullName

std::string BinaryNinja::DebugFunctionInfo::fullName

◆ rawName

std::string BinaryNinja::DebugFunctionInfo::rawName

◆ address

uint64_t BinaryNinja::DebugFunctionInfo::address

◆ type

Ref<Type> BinaryNinja::DebugFunctionInfo::type

◆ platform

Ref<Platform> BinaryNinja::DebugFunctionInfo::platform

◆ components

std::vector<std::string> BinaryNinja::DebugFunctionInfo::components

◆ BinaryNinja::DebugInfo

class BinaryNinja::DebugInfo

Public Member Functions

 DebugInfo (BNDebugInfo *debugInfo)
 
std::vector< std::string > GetParsers () const
 
TypeContainer GetTypeContainer (const std::string &parserName)
 Type Container for all types in the DebugInfo that resulted from the parse of the given parser. More...
 
std::vector< NameAndTypeGetTypes (const std::string &parserName="") const
 
std::vector< DebugFunctionInfoGetFunctions (const std::string &parserName="") const
 
std::vector< DataVariableAndNameGetDataVariables (const std::string &parserName="") const
 
Ref< TypeGetTypeByName (const std::string &parserName, const std::string &name) const
 
std::optional< std::tuple< uint64_t, Ref< Type > > > GetDataVariableByName (const std::string &parserName, const std::string &name) const
 
std::optional< std::tuple< std::string, Ref< Type > > > GetDataVariableByAddress (const std::string &parserName, const uint64_t address) const
 
std::vector< std::tuple< std::string, Ref< Type > > > GetTypesByName (const std::string &name) const
 
std::vector< std::tuple< std::string, uint64_t, Ref< Type > > > GetDataVariablesByName (const std::string &name) const
 
std::vector< std::tuple< std::string, std::string, Ref< Type > > > GetDataVariablesByAddress (const uint64_t address) const
 
bool RemoveParserInfo (const std::string &parserName)
 
bool RemoveParserTypes (const std::string &parserName)
 
bool RemoveParserFunctions (const std::string &parserName)
 
bool RemoveParserDataVariables (const std::string &parserName)
 
bool RemoveTypeByName (const std::string &parserName, const std::string &name)
 
bool RemoveFunctionByIndex (const std::string &parserName, const size_t index)
 
bool RemoveDataVariableByAddress (const std::string &parserName, const uint64_t address)
 
bool AddType (const std::string &name, Ref< Type > type, const std::vector< std::string > &components={})
 
bool AddFunction (const DebugFunctionInfo &function)
 
bool AddDataVariable (uint64_t address, Ref< Type > type, const std::string &name="", const std::vector< std::string > &components={})
 
- Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNDebugInfo, BNNewDebugInfoReference, BNFreeDebugInfoReference >
 CoreRefCountObject ()
 
virtual ~CoreRefCountObject ()
 
BNDebugInfoGetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void ReleaseForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Additional Inherited Members

- Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNDebugInfo, BNNewDebugInfoReference, BNFreeDebugInfoReference >
static BNDebugInfoGetObject (CoreRefCountObject *obj)
 
static BNDebugInfoGetObject (const CoreRefCountObject *obj)
 
- Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNDebugInfo, BNNewDebugInfoReference, BNFreeDebugInfoReference >
std::atomic< int > m_refs
 
bool m_registeredRef
 
BNDebugInfom_object
 

Constructor & Destructor Documentation

◆ DebugInfo()

DebugInfo::DebugInfo ( BNDebugInfo debugInfo)

Member Function Documentation

◆ GetParsers()

vector< string > DebugInfo::GetParsers ( ) const

◆ GetTypeContainer()

TypeContainer DebugInfo::GetTypeContainer ( const std::string &  parserName)

Type Container for all types in the DebugInfo that resulted from the parse of the given parser.

Parameters
parserNameName of parser
Returns
Type Container for types from that parser

◆ GetTypes()

vector< NameAndType > DebugInfo::GetTypes ( const std::string &  parserName = "") const

◆ GetFunctions()

vector< DebugFunctionInfo > DebugInfo::GetFunctions ( const std::string &  parserName = "") const

◆ GetDataVariables()

vector< DataVariableAndName > DebugInfo::GetDataVariables ( const std::string &  parserName = "") const

◆ GetTypeByName()

Ref< Type > DebugInfo::GetTypeByName ( const std::string &  parserName,
const std::string &  name 
) const

◆ GetDataVariableByName()

optional< tuple< uint64_t, Ref< Type > > > DebugInfo::GetDataVariableByName ( const std::string &  parserName,
const std::string &  name 
) const

◆ GetDataVariableByAddress()

optional< tuple< string, Ref< Type > > > DebugInfo::GetDataVariableByAddress ( const std::string &  parserName,
const uint64_t  address 
) const

◆ GetTypesByName()

vector< tuple< string, Ref< Type > > > DebugInfo::GetTypesByName ( const std::string &  name) const

◆ GetDataVariablesByName()

vector< tuple< string, uint64_t, Ref< Type > > > DebugInfo::GetDataVariablesByName ( const std::string &  name) const

◆ GetDataVariablesByAddress()

vector< tuple< string, string, Ref< Type > > > DebugInfo::GetDataVariablesByAddress ( const uint64_t  address) const

◆ RemoveParserInfo()

bool DebugInfo::RemoveParserInfo ( const std::string &  parserName)

◆ RemoveParserTypes()

bool DebugInfo::RemoveParserTypes ( const std::string &  parserName)

◆ RemoveParserFunctions()

bool DebugInfo::RemoveParserFunctions ( const std::string &  parserName)

◆ RemoveParserDataVariables()

bool DebugInfo::RemoveParserDataVariables ( const std::string &  parserName)

◆ RemoveTypeByName()

bool DebugInfo::RemoveTypeByName ( const std::string &  parserName,
const std::string &  name 
)

◆ RemoveFunctionByIndex()

bool DebugInfo::RemoveFunctionByIndex ( const std::string &  parserName,
const size_t  index 
)

◆ RemoveDataVariableByAddress()

bool DebugInfo::RemoveDataVariableByAddress ( const std::string &  parserName,
const uint64_t  address 
)

◆ AddType()

bool DebugInfo::AddType ( const std::string &  name,
Ref< Type type,
const std::vector< std::string > &  components = {} 
)

◆ AddFunction()

bool DebugInfo::AddFunction ( const DebugFunctionInfo function)

◆ AddDataVariable()

bool DebugInfo::AddDataVariable ( uint64_t  address,
Ref< Type type,
const std::string &  name = "",
const std::vector< std::string > &  components = {} 
)

◆ BinaryNinja::DebugInfoParser

class BinaryNinja::DebugInfoParser

Public Member Functions

 DebugInfoParser (BNDebugInfoParser *parser)
 
std::string GetName () const
 
Ref< DebugInfoParse (Ref< BinaryView > view, Ref< BinaryView > debugView, Ref< DebugInfo > existingDebugInfo=nullptr, std::function< bool(size_t, size_t)> progress={}) const
 
bool IsValidForView (const Ref< BinaryView > view) const
 
- Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNDebugInfoParser, BNNewDebugInfoParserReference, BNFreeDebugInfoParserReference >
 CoreRefCountObject ()
 
virtual ~CoreRefCountObject ()
 
BNDebugInfoParserGetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void ReleaseForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Static Public Member Functions

static Ref< DebugInfoParserGetByName (const std::string &name)
 
static std::vector< Ref< DebugInfoParser > > GetList ()
 
static std::vector< Ref< DebugInfoParser > > GetListForView (const Ref< BinaryView > data)
 
- Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNDebugInfoParser, BNNewDebugInfoParserReference, BNFreeDebugInfoParserReference >
static BNDebugInfoParserGetObject (CoreRefCountObject *obj)
 
static BNDebugInfoParserGetObject (const CoreRefCountObject *obj)
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNDebugInfoParser, BNNewDebugInfoParserReference, BNFreeDebugInfoParserReference >
std::atomic< int > m_refs
 
bool m_registeredRef
 
BNDebugInfoParserm_object
 

Constructor & Destructor Documentation

◆ DebugInfoParser()

DebugInfoParser::DebugInfoParser ( BNDebugInfoParser parser)

Member Function Documentation

◆ GetByName()

Ref< DebugInfoParser > DebugInfoParser::GetByName ( const std::string &  name)
static

◆ GetList()

vector< Ref< DebugInfoParser > > DebugInfoParser::GetList ( )
static

◆ GetListForView()

vector< Ref< DebugInfoParser > > DebugInfoParser::GetListForView ( const Ref< BinaryView data)
static

◆ GetName()

string DebugInfoParser::GetName ( ) const

◆ Parse()

Ref< DebugInfo > DebugInfoParser::Parse ( Ref< BinaryView view,
Ref< BinaryView debugView,
Ref< DebugInfo existingDebugInfo = nullptr,
std::function< bool(size_t, size_t)>  progress = {} 
) const

◆ IsValidForView()

bool DebugInfoParser::IsValidForView ( const Ref< BinaryView view) const

◆ BinaryNinja::CustomDebugInfoParser

class BinaryNinja::CustomDebugInfoParser

Public Member Functions

 CustomDebugInfoParser (const std::string &name)
 
virtual ~CustomDebugInfoParser ()
 
virtual bool IsValid (Ref< BinaryView >)=0
 
virtual bool ParseInfo (Ref< DebugInfo >, Ref< BinaryView >, Ref< BinaryView >, std::function< bool(size_t, size_t)>)=0
 
- Public Member Functions inherited from BinaryNinja::DebugInfoParser
 DebugInfoParser (BNDebugInfoParser *parser)
 
std::string GetName () const
 
Ref< DebugInfoParse (Ref< BinaryView > view, Ref< BinaryView > debugView, Ref< DebugInfo > existingDebugInfo=nullptr, std::function< bool(size_t, size_t)> progress={}) const
 
bool IsValidForView (const Ref< BinaryView > view) const
 
- Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNDebugInfoParser, BNNewDebugInfoParserReference, BNFreeDebugInfoParserReference >
 CoreRefCountObject ()
 
virtual ~CoreRefCountObject ()
 
BNDebugInfoParserGetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void ReleaseForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Additional Inherited Members

- Static Public Member Functions inherited from BinaryNinja::DebugInfoParser
static Ref< DebugInfoParserGetByName (const std::string &name)
 
static std::vector< Ref< DebugInfoParser > > GetList ()
 
static std::vector< Ref< DebugInfoParser > > GetListForView (const Ref< BinaryView > data)
 
- Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNDebugInfoParser, BNNewDebugInfoParserReference, BNFreeDebugInfoParserReference >
static BNDebugInfoParserGetObject (CoreRefCountObject *obj)
 
static BNDebugInfoParserGetObject (const CoreRefCountObject *obj)
 
- Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNDebugInfoParser, BNNewDebugInfoParserReference, BNFreeDebugInfoParserReference >
std::atomic< int > m_refs
 
bool m_registeredRef
 
BNDebugInfoParserm_object
 

Constructor & Destructor Documentation

◆ CustomDebugInfoParser()

CustomDebugInfoParser::CustomDebugInfoParser ( const std::string &  name)

◆ ~CustomDebugInfoParser()

virtual BinaryNinja::CustomDebugInfoParser::~CustomDebugInfoParser ( )
inlinevirtual

Member Function Documentation

◆ IsValid()

virtual bool BinaryNinja::CustomDebugInfoParser::IsValid ( Ref< BinaryView )
pure virtual

◆ ParseInfo()

virtual bool BinaryNinja::CustomDebugInfoParser::ParseInfo ( Ref< DebugInfo ,
Ref< BinaryView ,
Ref< BinaryView ,
std::function< bool(size_t, size_t)>   
)
pure virtual