Skip to content

Commit 99a8573

Browse files
committed
fix missing params in ILOperands and mark as deprecated in LLIL, HLIL
1 parent 5ec6a03 commit 99a8573

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

python/highlevelil.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ class HighLevelILInstruction(BaseILInstruction):
146146
core_instr: CoreHighLevelILInstruction
147147
as_ast: bool
148148
instr_index: InstructionIndex
149+
# ILOperations is deprecated and will be removed in a future version once BNIL Graph no longer uses it
150+
# Use the visit methods visit, visit_all, and visit_operands
149151
ILOperations: ClassVar[Mapping[HighLevelILOperation, List[Tuple[str, str]]]] = {
150152
HighLevelILOperation.HLIL_NOP: [], HighLevelILOperation.HLIL_BLOCK: [("body", "expr_list")],
151153
HighLevelILOperation.HLIL_IF: [("condition", "expr"), ("true", "expr"),

python/lowlevelil.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ class LowLevelILInstruction(BaseILInstruction):
322322
expr_index: ExpressionIndex
323323
instr: CoreLowLevelILInstruction
324324
instr_index: Optional[InstructionIndex]
325+
# ILOperations is deprecated and will be removed in a future version once BNIL Graph no longer uses it
326+
# Use the visit methods visit, visit_all, and visit_operands
325327
ILOperations: ClassVar[Dict[LowLevelILOperation, List[Tuple[str, str]]]] = {
326328
LowLevelILOperation.LLIL_NOP: [], LowLevelILOperation.LLIL_SET_REG: [("dest", "reg"), ("src", "expr")],
327329
LowLevelILOperation.LLIL_SET_REG_SPLIT: [("hi", "reg"), ("lo", "reg"),

python/mediumlevelil.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class MediumLevelILInstruction(BaseILInstruction):
176176
instr: CoreMediumLevelILInstruction
177177
instr_index: InstructionIndex
178178

179-
# ILOperations is deprecated and will be removed in a future version
179+
# ILOperations is deprecated and will be removed in a future version once BNIL Graph no longer uses it
180180
# Use the visit methods visit, visit_all, and visit_operands
181181
ILOperations: ClassVar[Mapping[MediumLevelILOperation, List[Tuple[str, str]]]] = {
182182
MediumLevelILOperation.MLIL_NOP: [], MediumLevelILOperation.MLIL_SET_VAR: [("dest", "var"), ("src", "expr")],
@@ -332,13 +332,13 @@ class MediumLevelILInstruction(BaseILInstruction):
332332
], MediumLevelILOperation.MLIL_SET_VAR_SSA: [
333333
("dest", "var_ssa"), ("src", "expr")
334334
], MediumLevelILOperation.MLIL_SET_VAR_SSA_FIELD: [
335-
("prev", "var_ssa_dest_and_src"), ("offset", "int"), ("src", "expr")
335+
("dest", "var_ssa_dest_and_src"), ("prev", "var_ssa_dest_and_src"), ("offset", "int"), ("src", "expr")
336336
], MediumLevelILOperation.MLIL_SET_VAR_SPLIT_SSA: [
337337
("high", "var_ssa"), ("low", "var_ssa"), ("src", "expr")
338338
], MediumLevelILOperation.MLIL_SET_VAR_ALIASED: [
339-
("prev", "var_ssa_dest_and_src"), ("src", "expr")
339+
("dest", "var_ssa_dest_and_src"), ("prev", "var_ssa_dest_and_src"), ("src", "expr")
340340
], MediumLevelILOperation.MLIL_SET_VAR_ALIASED_FIELD: [
341-
("prev", "var_ssa_dest_and_src"), ("offset", "int"), ("src", "expr")
341+
("dest", "var_ssa_dest_and_src"), ("prev", "var_ssa_dest_and_src"), ("offset", "int"), ("src", "expr")
342342
], MediumLevelILOperation.MLIL_VAR_SSA: [("src", "var_ssa")], MediumLevelILOperation.MLIL_VAR_SSA_FIELD: [
343343
("src", "var_ssa"), ("offset", "int")
344344
], MediumLevelILOperation.MLIL_VAR_ALIASED: [
@@ -348,7 +348,7 @@ class MediumLevelILInstruction(BaseILInstruction):
348348
], MediumLevelILOperation.MLIL_VAR_SPLIT_SSA: [
349349
("high", "var_ssa"), ("low", "var_ssa")
350350
], MediumLevelILOperation.MLIL_CALL_SSA: [
351-
("output", "expr"), ("dest", "expr"),
351+
("output", "expr"), ("output_dest_memory", "int"), ("dest", "expr"),
352352
("params", "expr_list"), ("src_memory", "int")
353353
], MediumLevelILOperation.MLIL_CALL_UNTYPED_SSA: [
354354
("output", "expr"), ("dest", "expr"), ("params", "expr"), ("stack", "expr")
@@ -358,7 +358,8 @@ class MediumLevelILInstruction(BaseILInstruction):
358358
], MediumLevelILOperation.MLIL_SYSCALL_UNTYPED_SSA: [
359359
("output", "expr"), ("params", "expr"), ("stack", "expr")
360360
], MediumLevelILOperation.MLIL_TAILCALL_SSA: [
361-
("output", "expr"), ("dest", "expr"), ("params", "expr_list"), ("src_memory", "int")
361+
("output", "expr"), ("output_dest_memory", "int"),
362+
("dest", "expr"), ("params", "expr_list"), ("src_memory", "int")
362363
], MediumLevelILOperation.MLIL_TAILCALL_UNTYPED_SSA: [
363364
("output", "expr"), ("dest", "expr"), ("params", "expr"), ("stack", "expr")
364365
], MediumLevelILOperation.MLIL_CALL_OUTPUT_SSA: [

0 commit comments

Comments
 (0)