diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-12-03 22:20:28 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-12-13 13:32:18 -0500 |
| commit | 231afab8b0ba6c8c9eff879681c52724b6688c18 (patch) | |
| tree | 38026cfa20f34702b7267e9c397652119f27ebe7 /binaryninjaapi.h | |
| parent | 7357dd114a145ca64e7356233c3cb8b9dd9eae84 (diff) | |
Commonize all InstructionTextToken generation
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 18bc4b76..a750cfbb 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -1037,18 +1037,24 @@ namespace BinaryNinja BNInstructionTextTokenContext context; uint8_t confidence; uint64_t address; + std::vector<std::string> typeNames; InstructionTextToken(); InstructionTextToken(uint8_t confidence, BNInstructionTextTokenType t, const std::string& txt); InstructionTextToken(BNInstructionTextTokenType type, const std::string& text, uint64_t value = 0, - size_t size = 0, size_t operand = BN_INVALID_OPERAND, uint8_t confidence = BN_FULL_CONFIDENCE); + size_t size = 0, size_t operand = BN_INVALID_OPERAND, uint8_t confidence = BN_FULL_CONFIDENCE, + const std::vector<std::string>& typeName={}); InstructionTextToken(BNInstructionTextTokenType type, BNInstructionTextTokenContext context, const std::string& text, uint64_t address, uint64_t value = 0, size_t size = 0, - size_t operand = BN_INVALID_OPERAND, uint8_t confidence = BN_FULL_CONFIDENCE); + size_t operand = BN_INVALID_OPERAND, uint8_t confidence = BN_FULL_CONFIDENCE, const std::vector<std::string>& typeName={}); InstructionTextToken WithConfidence(uint8_t conf); + static BNInstructionTextToken* CreateInstructionTextTokenList(const std::vector<InstructionTextToken>& tokens); + static std::vector<InstructionTextToken> ConvertAndFreeInstructionTextTokenList(BNInstructionTextToken* tokens, size_t count); + static std::vector<InstructionTextToken> ConvertInstructionTextTokenList(const BNInstructionTextToken* tokens, size_t count); }; + struct DisassemblyTextLine { uint64_t addr; |
