summaryrefslogtreecommitdiff
path: root/python/architecture.py
diff options
context:
space:
mode:
authorRyan Snyder <ryan@vector35.com>2023-08-31 08:25:12 -0400
committerRyan Snyder <ryan@vector35.com>2024-02-07 19:36:57 -0500
commit533b108f96f9073fd4e075ccd330c07713a49d99 (patch)
tree1a45a269fe0c590483975349c32c8d9fe08bc2c5 /python/architecture.py
parenta5129e2073b5bf6254d758f56d7ee3677a6fb599 (diff)
add exprIndex field to BNInstructionTextToken
Diffstat (limited to 'python/architecture.py')
-rw-r--r--python/architecture.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/architecture.py b/python/architecture.py
index 9fb32e0d..677192e4 100644
--- a/python/architecture.py
+++ b/python/architecture.py
@@ -2798,6 +2798,7 @@ class InstructionTextToken:
confidence: int = core.max_confidence
typeNames: List[str] = field(default_factory=list)
width: int = 0
+ il_expr_index: int = 0xffffffffffffffff
def __post_init__(self):
if self.width == 0:
@@ -2819,6 +2820,7 @@ class InstructionTextToken:
context = tokens[j].context
confidence = tokens[j].confidence
address = tokens[j].address
+ il_expr_index = tokens[j].exprIndex
typeNames = []
for i in range(tokens[j].namesCount):
if not isinstance(tokens[j].typeNames[i], str):
@@ -2827,7 +2829,7 @@ class InstructionTextToken:
typeNames.append(tokens[j].typeNames[i])
result.append(
InstructionTextToken(
- token_type, text, value, size, operand, context, address, confidence, typeNames, width
+ token_type, text, value, size, operand, context, address, confidence, typeNames, width, il_expr_index
)
)
return result
@@ -2848,6 +2850,7 @@ class InstructionTextToken:
result[j].address = tokens[j].address
result[j].namesCount = len(tokens[j].typeNames)
result[j].typeNames = (ctypes.c_char_p * len(tokens[j].typeNames))()
+ result[j].exprIndex = tokens[j].il_expr_index
for i in range(len(tokens[j].typeNames)):
result[j].typeNames[i] = tokens[j].typeNames[i].encode("utf-8")
return result