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.

InstructionTextTokenTypeDescription
AddressDisplayTokenNot emitted by architectures
AnnotationTokenNot emitted by architectures
ArgumentNameTokenNot emitted by architectures
BeginMemoryOperandTokenThe start of memory operand
CharacterConstantTokenA printable character
CodeRelativeAddressTokenNot emitted by architectures
CodeSymbolTokenNot emitted by architectures
DataSymbolTokenNot emitted by architectures
EndMemoryOperandTokenThe end of a memory operand
ExternalSymbolTokenNot emitted by architectures
FieldNameTokenNot emitted by architectures
FloatingPointTokenFloating point number
HexDumpByteValueTokenNot emitted by architectures
HexDumpInvalidByteTokenNot emitted by architectures
HexDumpSkippedByteTokenNot emitted by architectures
HexDumpTextTokenNot emitted by architectures
ImportTokenNot emitted by architectures
IndirectImportTokenNot emitted by architectures
InstructionTokenThe instruction mnemonic
IntegerTokenIntegers
KeywordTokenNot emitted by architectures
LocalVariableTokenNot emitted by architectures
StackVariableTokenNot emitted by architectures
NameSpaceSeparatorTokenNot emitted by architectures
NameSpaceTokenNot emitted by architectures
OpcodeTokenNot emitted by architectures
OperandSeparatorTokenThe comma or delimiter that separates tokens
PossibleAddressTokenIntegers that are likely addresses
RegisterTokenRegisters
StringTokenNot emitted by architectures
StructOffsetTokenNot emitted by architectures
TagTokenNot emitted by architectures
TextTokenUsed for anything not of another type.
CommentTokenComments
TypeNameTokenNot emitted by architectures
AddressSeparatorTokenNot 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)
BNInstructionTextToken GetAPIObject () const

Static Public Member Functions

static InstructionTextToken FromAPIObject (const BNInstructionTextToken *token)
static void FreeAPIObject (BNInstructionTextToken *token)
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)

◆ GetAPIObject()

BNInstructionTextToken InstructionTextToken::GetAPIObject ( ) const

◆ FromAPIObject()

InstructionTextToken InstructionTextToken::FromAPIObject ( const BNInstructionTextToken * token)
static

◆ FreeAPIObject()

void InstructionTextToken::FreeAPIObject ( BNInstructionTextToken * token)
static

◆ 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