From b25c910f92e75de31e3dc0513281d8d4632b8cc0 Mon Sep 17 00:00:00 2001 From: elicn Date: Thu, 20 Feb 2025 13:17:25 +0200 Subject: [PATCH] Fix QDB bug where prophecy target could be None --- qiling/debugger/qdb/branch_predictor/branch_predictor_arm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qiling/debugger/qdb/branch_predictor/branch_predictor_arm.py b/qiling/debugger/qdb/branch_predictor/branch_predictor_arm.py index 02712bd5..e46150f6 100644 --- a/qiling/debugger/qdb/branch_predictor/branch_predictor_arm.py +++ b/qiling/debugger/qdb/branch_predictor/branch_predictor_arm.py @@ -244,8 +244,8 @@ class BranchPredictorARM(BranchPredictor, ArchARM): _, r = line.op_str.split(", ") prophecy.where = self.read_reg(r) - if prophecy.where & 1: - prophecy.where -= 1 + if prophecy.where is not None: + prophecy.where &= ~0b1 return prophecy