Loading...
Searching...
No Matches
BinaryNinja::InstructionTextToken Struct Reference

`InstructionTextToken` is used to tell the core about the various components in the disassembly views. More...

Detailed Description

`InstructionTextToken` is used to tell the core about the various components in the disassembly views.

The below table is provided for documentation purposes but the complete list of TokenTypes is available at `InstructionTextTokenType`. Note that types marked as `Not emitted by architectures` are not intended to be used by Architectures during lifting. Rather, they are added by the core during analysis or display. UI plugins, however, may make use of them as appropriate.

Uses of tokens include plugins that parse the output of an architecture (though parsing IL is recommended), or additionally, applying color schemes appropriately.

========================== ============================================ InstructionTextTokenType Description ========================== ============================================ AddressDisplayToken **Not emitted by architectures** AnnotationToken **Not emitted by architectures** ArgumentNameToken **Not emitted by architectures** BeginMemoryOperandToken The start of memory operand CharacterConstantToken A printable character CodeRelativeAddressToken **Not emitted by architectures** CodeSymbolToken **Not emitted by architectures** DataSymbolToken **Not emitted by architectures** EndMemoryOperandToken The end of a memory operand ExternalSymbolToken **Not emitted by architectures** FieldNameToken **Not emitted by architectures** FloatingPointToken Floating point number HexDumpByteValueToken **Not emitted by architectures** HexDumpInvalidByteToken **Not emitted by architectures** HexDumpSkippedByteToken **Not emitted by architectures** HexDumpTextToken **Not emitted by architectures** ImportToken **Not emitted by architectures** IndirectImportToken **Not emitted by architectures** InstructionToken The instruction mnemonic IntegerToken Integers KeywordToken **Not emitted by architectures** LocalVariableToken **Not emitted by architectures** StackVariableToken **Not emitted by architectures** NameSpaceSeparatorToken **Not emitted by architectures** NameSpaceToken **Not emitted by architectures** OpcodeToken **Not emitted by architectures** OperandSeparatorToken The comma or delimiter that separates tokens PossibleAddressToken Integers that are likely addresses RegisterToken Registers StringToken **Not emitted by architectures** StructOffsetToken **Not emitted by architectures** TagToken **Not emitted by architectures** TextToken Used for anything not of another type. CommentToken Comments TypeNameToken **Not emitted by architectures** AddressSeparatorToken **Not emitted by architectures** ========================== ============================================

Public Types

enum  { WidthIsByteCount = 0 }
 

Public Member Functions

 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=0xffffffff, uint8_t confidence=255, const std::vector< std::string > &typeName={}, uint64_t width=WidthIsByteCount)
 
 InstructionTextToken (BNInstructionTextTokenType type, BNInstructionTextTokenContext context, const std::string &text, uint64_t address, uint64_t value=0, size_t size=0, size_t operand=0xffffffff, uint8_t confidence=255, const std::vector< std::string > &typeName={}, uint64_t width=WidthIsByteCount)
 
 InstructionTextToken (const BNInstructionTextToken &token)
 
InstructionTextToken WithConfidence (uint8_t conf)
 

Static Public Member Functions

static void ConvertInstructionTextToken (const InstructionTextToken &token, BNInstructionTextToken *result)
 
static BNInstructionTextTokenCreateInstructionTextTokenList (const std::vector< InstructionTextToken > &tokens)
 
static void FreeInstructionTextToken (BNInstructionTextToken *token)
 
static void FreeInstructionTextTokenList (BNInstructionTextToken *tokens, size_t count)
 
static std::vector< InstructionTextTokenConvertAndFreeInstructionTextTokenList (BNInstructionTextToken *tokens, size_t count)
 
static std::vector< InstructionTextTokenConvertInstructionTextTokenList (const BNInstructionTextToken *tokens, size_t count)
 

Public Attributes

BNInstructionTextTokenType type
 
std::string text
 
uint64_t value
 
uint64_t width
 
size_t size
 
size_t operand
 
BNInstructionTextTokenContext context
 
uint8_t confidence
 
uint64_t address
 
std::vector< std::string > typeNames
 
size_t exprIndex
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
WidthIsByteCount 

Constructor & Destructor Documentation

◆ InstructionTextToken() [1/5]

InstructionTextToken::InstructionTextToken ( )

◆ InstructionTextToken() [2/5]

BinaryNinja::InstructionTextToken::InstructionTextToken ( uint8_t confidence,
BNInstructionTextTokenType t,
const std::string & txt )

◆ InstructionTextToken() [3/5]

BinaryNinja::InstructionTextToken::InstructionTextToken ( BNInstructionTextTokenType type,
const std::string & text,
uint64_t value = 0,
size_t size = 0,
size_t operand = 0xffffffff,
uint8_t confidence = 255,
const std::vector< std::string > & typeName = {},
uint64_t width = WidthIsByteCount )

◆ InstructionTextToken() [4/5]

BinaryNinja::InstructionTextToken::InstructionTextToken ( BNInstructionTextTokenType type,
BNInstructionTextTokenContext context,
const std::string & text,
uint64_t address,
uint64_t value = 0,
size_t size = 0,
size_t operand = 0xffffffff,
uint8_t confidence = 255,
const std::vector< std::string > & typeName = {},
uint64_t width = WidthIsByteCount )

◆ InstructionTextToken() [5/5]

InstructionTextToken::InstructionTextToken ( const BNInstructionTextToken & token)

Member Function Documentation

◆ WithConfidence()

InstructionTextToken InstructionTextToken::WithConfidence ( uint8_t conf)

◆ ConvertInstructionTextToken()

void InstructionTextToken::ConvertInstructionTextToken ( const InstructionTextToken & token,
BNInstructionTextToken * result )
static

◆ CreateInstructionTextTokenList()

BNInstructionTextToken * InstructionTextToken::CreateInstructionTextTokenList ( const std::vector< InstructionTextToken > & tokens)
static

◆ FreeInstructionTextToken()

void InstructionTextToken::FreeInstructionTextToken ( BNInstructionTextToken * token)
static

◆ FreeInstructionTextTokenList()

void InstructionTextToken::FreeInstructionTextTokenList ( BNInstructionTextToken * tokens,
size_t count )
static

◆ ConvertAndFreeInstructionTextTokenList()

vector< InstructionTextToken > InstructionTextToken::ConvertAndFreeInstructionTextTokenList ( BNInstructionTextToken * tokens,
size_t count )
static

◆ ConvertInstructionTextTokenList()

vector< InstructionTextToken > InstructionTextToken::ConvertInstructionTextTokenList ( const BNInstructionTextToken * tokens,
size_t count )
static

Member Data Documentation

◆ type

BNInstructionTextTokenType BinaryNinja::InstructionTextToken::type

◆ text

std::string BinaryNinja::InstructionTextToken::text

◆ value

uint64_t BinaryNinja::InstructionTextToken::value

◆ width

uint64_t BinaryNinja::InstructionTextToken::width

◆ size

size_t BinaryNinja::InstructionTextToken::size

◆ operand

size_t BinaryNinja::InstructionTextToken::operand

◆ context

BNInstructionTextTokenContext BinaryNinja::InstructionTextToken::context

◆ confidence

uint8_t BinaryNinja::InstructionTextToken::confidence

◆ address

uint64_t BinaryNinja::InstructionTextToken::address

◆ typeNames

std::vector<std::string> BinaryNinja::InstructionTextToken::typeNames

◆ exprIndex

size_t BinaryNinja::InstructionTextToken::exprIndex