|
virtual bool | PreprocessSource (const std::string &source, const std::string &fileName, Ref< Platform > platform, const std::map< QualifiedName, TypeAndId > &existingTypes, const std::vector< std::string > &options, const std::vector< std::string > &includeDirs, std::string &output, std::vector< TypeParserError > &errors)=0 |
| Preprocess a block of source, returning the source that would be parsed. More...
|
|
virtual bool | ParseTypesFromSource (const std::string &source, const std::string &fileName, Ref< Platform > platform, const std::map< QualifiedName, TypeAndId > &existingTypes, const std::vector< std::string > &options, const std::vector< std::string > &includeDirs, const std::string &autoTypeSource, TypeParserResult &result, std::vector< TypeParserError > &errors)=0 |
| Parse an entire block of source into types, variables, and functions. More...
|
|
virtual bool | ParseTypeString (const std::string &source, Ref< Platform > platform, const std::map< QualifiedName, TypeAndId > &existingTypes, QualifiedNameAndType &result, std::vector< TypeParserError > &errors)=0 |
| Parse a single type and name from a string containing their definition. More...
|
|
| StaticCoreRefCountObject () |
|
virtual | ~StaticCoreRefCountObject () |
|
BNTypeParser * | GetObject () const |
|
void | AddRef () |
|
void | Release () |
|
void | AddRefForRegistration () |
|
|
static bool | PreprocessSourceCallback (void *ctxt, const char *source, const char *fileName, BNPlatform *platform, const BNQualifiedNameTypeAndId *existingTypes, size_t existingTypeCount, const char *const *options, size_t optionCount, const char *const *includeDirs, size_t includeDirCount, char **output, BNTypeParserError **errors, size_t *errorCount) |
|
static bool | ParseTypesFromSourceCallback (void *ctxt, const char *source, const char *fileName, BNPlatform *platform, const BNQualifiedNameTypeAndId *existingTypes, size_t existingTypeCount, const char *const *options, size_t optionCount, const char *const *includeDirs, size_t includeDirCount, const char *autoTypeSource, BNTypeParserResult *result, BNTypeParserError **errors, size_t *errorCount) |
|
static bool | ParseTypeStringCallback (void *ctxt, const char *source, BNPlatform *platform, const BNQualifiedNameTypeAndId *existingTypes, size_t existingTypeCount, BNQualifiedNameAndType *result, BNTypeParserError **errors, size_t *errorCount) |
|
static void | FreeStringCallback (void *ctxt, char *result) |
|
static void | FreeResultCallback (void *ctxt, BNTypeParserResult *result) |
|
static void | FreeErrorListCallback (void *ctxt, BNTypeParserError *errors, size_t errorCount) |
|
◆ TypeParser() [1/2]
BinaryNinja::TypeParser::TypeParser |
( |
const std::string & |
name | ) |
|
|
explicitprotected |
◆ TypeParser() [2/2]
TypeParser::TypeParser |
( |
BNTypeParser * |
parser | ) |
|
|
protected |
◆ FreeErrorListCallback()
void TypeParser::FreeErrorListCallback |
( |
void * |
ctxt, |
|
|
BNTypeParserError * |
errors, |
|
|
size_t |
errorCount |
|
) |
| |
|
staticprotected |
◆ FreeResultCallback()
◆ FreeStringCallback()
void TypeParser::FreeStringCallback |
( |
void * |
ctxt, |
|
|
char * |
result |
|
) |
| |
|
staticprotected |
◆ GetByName()
Ref< TypeParser > TypeParser::GetByName |
( |
const std::string & |
name | ) |
|
|
static |
◆ GetDefault()
◆ GetList()
◆ ParseTypesFromSource()
virtual bool BinaryNinja::TypeParser::ParseTypesFromSource |
( |
const std::string & |
source, |
|
|
const std::string & |
fileName, |
|
|
Ref< Platform > |
platform, |
|
|
const std::map< QualifiedName, TypeAndId > & |
existingTypes, |
|
|
const std::vector< std::string > & |
options, |
|
|
const std::vector< std::string > & |
includeDirs, |
|
|
const std::string & |
autoTypeSource, |
|
|
TypeParserResult & |
result, |
|
|
std::vector< TypeParserError > & |
errors |
|
) |
| |
|
pure virtual |
Parse an entire block of source into types, variables, and functions.
- Parameters
-
source | Source code to parse |
fileName | Name of the file containing the source (optional: exists on disk) |
platform | Platform to assume the types are relevant to |
existingTypes | Map of all existing types to use for parsing context |
options | String arguments to pass as options, e.g. command line arguments |
includeDirs | List of directories to include in the header search path |
autoTypeSource | Optional source of types if used for automatically generated types |
result | Reference to structure into which the results will be written |
errors | Reference to a list into which any parse errors will be written |
- Returns
- True if parsing was successful
Implemented in BinaryNinja::CoreTypeParser.
◆ ParseTypesFromSourceCallback()
bool TypeParser::ParseTypesFromSourceCallback |
( |
void * |
ctxt, |
|
|
const char * |
source, |
|
|
const char * |
fileName, |
|
|
BNPlatform * |
platform, |
|
|
const BNQualifiedNameTypeAndId * |
existingTypes, |
|
|
size_t |
existingTypeCount, |
|
|
const char *const * |
options, |
|
|
size_t |
optionCount, |
|
|
const char *const * |
includeDirs, |
|
|
size_t |
includeDirCount, |
|
|
const char * |
autoTypeSource, |
|
|
BNTypeParserResult * |
result, |
|
|
BNTypeParserError ** |
errors, |
|
|
size_t * |
errorCount |
|
) |
| |
|
staticprotected |
◆ ParseTypeString()
Parse a single type and name from a string containing their definition.
- Parameters
-
source | Source code to parse |
platform | Platform to assume the types are relevant to |
existingTypes | Map of all existing types to use for parsing context |
result | Reference into which the resulting type and name will be written |
errors | Reference to a list into which any parse errors will be written |
- Returns
- True if parsing was successful
Implemented in BinaryNinja::CoreTypeParser.
◆ ParseTypeStringCallback()
◆ PreprocessSource()
virtual bool BinaryNinja::TypeParser::PreprocessSource |
( |
const std::string & |
source, |
|
|
const std::string & |
fileName, |
|
|
Ref< Platform > |
platform, |
|
|
const std::map< QualifiedName, TypeAndId > & |
existingTypes, |
|
|
const std::vector< std::string > & |
options, |
|
|
const std::vector< std::string > & |
includeDirs, |
|
|
std::string & |
output, |
|
|
std::vector< TypeParserError > & |
errors |
|
) |
| |
|
pure virtual |
Preprocess a block of source, returning the source that would be parsed.
- Parameters
-
source | Source code to process |
fileName | Name of the file containing the source (does not need to exist on disk) |
platform | Platform to assume the source is relevant to |
existingTypes | Map of all existing types to use for parsing context |
options | String arguments to pass as options, e.g. command line arguments |
includeDirs | List of directories to include in the header search path |
output | Reference to a string into which the preprocessed source will be written |
errors | Reference to a list into which any parse errors will be written |
- Returns
- True if preprocessing was successful
Implemented in BinaryNinja::CoreTypeParser.
◆ PreprocessSourceCallback()
bool TypeParser::PreprocessSourceCallback |
( |
void * |
ctxt, |
|
|
const char * |
source, |
|
|
const char * |
fileName, |
|
|
BNPlatform * |
platform, |
|
|
const BNQualifiedNameTypeAndId * |
existingTypes, |
|
|
size_t |
existingTypeCount, |
|
|
const char *const * |
options, |
|
|
size_t |
optionCount, |
|
|
const char *const * |
includeDirs, |
|
|
size_t |
includeDirCount, |
|
|
char ** |
output, |
|
|
BNTypeParserError ** |
errors, |
|
|
size_t * |
errorCount |
|
) |
| |
|
staticprotected |
◆ Register()
The documentation for this class was generated from the following files: