diff options
| author | Ryan Snyder <ryan@vector35.com> | 2023-08-31 08:25:12 -0400 |
|---|---|---|
| committer | Ryan Snyder <ryan@vector35.com> | 2024-02-07 19:36:57 -0500 |
| commit | 533b108f96f9073fd4e075ccd330c07713a49d99 (patch) | |
| tree | 1a45a269fe0c590483975349c32c8d9fe08bc2c5 /architecture.cpp | |
| parent | a5129e2073b5bf6254d758f56d7ee3677a6fb599 (diff) | |
add exprIndex field to BNInstructionTextToken
Diffstat (limited to 'architecture.cpp')
| -rw-r--r-- | architecture.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/architecture.cpp b/architecture.cpp index 7a4822e4..7c9cc9b5 100644 --- a/architecture.cpp +++ b/architecture.cpp @@ -51,7 +51,7 @@ void InstructionInfo::AddBranch(BNBranchType type, uint64_t target, Architecture InstructionTextToken::InstructionTextToken() : type(TextToken), value(0), width(WidthIsByteCount), size(0), operand(BN_INVALID_OPERAND), - context(NoTokenContext), confidence(BN_FULL_CONFIDENCE), address(0) + context(NoTokenContext), confidence(BN_FULL_CONFIDENCE), address(0), exprIndex(BN_INVALID_EXPR) { if (width == WidthIsByteCount) { @@ -64,7 +64,7 @@ InstructionTextToken::InstructionTextToken(BNInstructionTextTokenType t, const s size_t o, uint8_t c, const vector<string>& n, uint64_t w) : type(t), text(txt), value(val), width(w), size(s), operand(o), context(NoTokenContext), confidence(c), address(0), - typeNames(n) + typeNames(n), exprIndex(BN_INVALID_EXPR) { if (width == WidthIsByteCount) { @@ -76,7 +76,8 @@ InstructionTextToken::InstructionTextToken(BNInstructionTextTokenType t, const s InstructionTextToken::InstructionTextToken(BNInstructionTextTokenType t, BNInstructionTextTokenContext ctxt, const string& txt, uint64_t a, uint64_t val, size_t s, size_t o, uint8_t c, const vector<string>& n, uint64_t w) : type(t), - text(txt), value(val), width(w), size(s), operand(o), context(ctxt), confidence(c), address(a), typeNames(n) + text(txt), value(val), width(w), size(s), operand(o), context(ctxt), confidence(c), address(a), typeNames(n), + exprIndex(BN_INVALID_EXPR) { if (width == WidthIsByteCount) { @@ -87,7 +88,8 @@ InstructionTextToken::InstructionTextToken(BNInstructionTextTokenType t, BNInstr InstructionTextToken::InstructionTextToken(const BNInstructionTextToken& token) : type(token.type), text(token.text), value(token.value), width(token.width), size(token.size), - operand(token.operand), context(token.context), confidence(token.confidence), address(token.address) + operand(token.operand), context(token.context), confidence(token.confidence), address(token.address), + exprIndex(BN_INVALID_EXPR) { typeNames.reserve(token.namesCount); for (size_t j = 0; j < token.namesCount; j++) @@ -120,6 +122,7 @@ static void ConvertInstructionTextToken(const InstructionTextToken& token, BNIns for (size_t i = 0; i < token.typeNames.size(); i++) result->typeNames[i] = BNAllocString(token.typeNames[i].c_str()); result->namesCount = token.typeNames.size(); + result->exprIndex = token.exprIndex; } |
