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 /python | |
| parent | a5129e2073b5bf6254d758f56d7ee3677a6fb599 (diff) | |
add exprIndex field to BNInstructionTextToken
Diffstat (limited to 'python')
| -rw-r--r-- | python/architecture.py | 5 |
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 |
