Skip to content

Commit 38c7f5f

Browse files
comments added
1 parent 79d71ae commit 38c7f5f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

plasma/lib/analyzer.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,19 +276,20 @@ def add_stack_variable(self, func_obj, inst, offset, op_size):
276276

277277

278278
# Do an analysis if the immediate is an address
279-
# If from_save_imm is true, op is the destination where we save imm
280-
# -> inst op, computed_imm
281-
def analyze_imm(self, i, op, imm, from_save_imm, is_deref_pointer):
282-
ret = self.__analyze_imm(i, op, imm, from_save_imm, is_deref_pointer)
279+
# is_written_op: if true this is the operand destination where
280+
# we write the immediate value. imm is computed by arch/*/analyzer.c*
281+
# -> inst op, imm
282+
def analyze_imm(self, i, op, imm, is_written_op, is_deref_pointer):
283+
ret = self.__analyze_imm(i, op, imm, is_written_op, is_deref_pointer)
283284
if ret and op.type != self.ARCH_UTILS.OP_IMM:
284285
self.db.immediates[i.address] = imm
285286

286287

287-
def __analyze_imm(self, i, op, imm, from_save_imm, is_deref_pointer):
288+
def __analyze_imm(self, i, op, imm, is_written_op, is_deref_pointer):
288289
if imm <= 1024:
289290
return False
290291

291-
if not from_save_imm and op.type == self.ARCH_UTILS.OP_REG:
292+
if not is_written_op and op.type == self.ARCH_UTILS.OP_REG:
292293
return False
293294

294295
# imm must be an address

0 commit comments

Comments
 (0)