From 231afab8b0ba6c8c9eff879681c52724b6688c18 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Mon, 3 Dec 2018 22:20:28 -0500 Subject: Commonize all InstructionTextToken generation --- binaryninjaapi.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'binaryninjaapi.h') 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 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& 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& typeName={}); InstructionTextToken WithConfidence(uint8_t conf); + static BNInstructionTextToken* CreateInstructionTextTokenList(const std::vector& tokens); + static std::vector ConvertAndFreeInstructionTextTokenList(BNInstructionTextToken* tokens, size_t count); + static std::vector ConvertInstructionTextTokenList(const BNInstructionTextToken* tokens, size_t count); }; + struct DisassemblyTextLine { uint64_t addr; -- cgit v1.3.1