about summary refs log tree commit diff stats
path: root/miasm2/arch/arm/sem.py
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2016-09-15 17:37:50 +0200
committerGitHub <noreply@github.com>2016-09-15 17:37:50 +0200
commit87e54bf72bead0ff71d7c2a5f9461ff96eb49e9b (patch)
treef0ea88a518dd6ea9f0741286130ff62b3db1bb08 /miasm2/arch/arm/sem.py
parent77654852fc08d1770dc6c1b95376bff45602f7d9 (diff)
parent7429d8e676bf2e605bb98f864847127208adb26b (diff)
downloadmiasm-87e54bf72bead0ff71d7c2a5f9461ff96eb49e9b.tar.gz
miasm-87e54bf72bead0ff71d7c2a5f9461ff96eb49e9b.zip
Merge pull request #429 from serpilliere/arm_updt_bkpt
Arm: fix bkpt
Diffstat (limited to 'miasm2/arch/arm/sem.py')
-rw-r--r--miasm2/arch/arm/sem.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/miasm2/arch/arm/sem.py b/miasm2/arch/arm/sem.py
index be44061e..1b7ad47f 100644
--- a/miasm2/arch/arm/sem.py
+++ b/miasm2/arch/arm/sem.py
@@ -5,6 +5,7 @@ from miasm2.arch.arm.regs import *
 
 
 # liris.cnrs.fr/~mmrissa/lib/exe/fetch.php?media=armv7-a-r-manual.pdf
+EXCEPT_SOFT_BP = (1 << 1)
 
 EXCEPT_PRIV_INSN = (1 << 17)
 
@@ -948,6 +949,13 @@ def uxtab(ir, instr, a, b, c):
     return e
 
 
+def bkpt(ir, instr, a):
+    e = []
+    e.append(ExprAff(exception_flags, ExprInt32(EXCEPT_SOFT_BP)))
+    e.append(ExprAff(bp_num, a))
+    return e
+
+
 
 COND_EQ = 0
 COND_NE = 1
@@ -1093,6 +1101,7 @@ mnemo_condm0 = {'add': add,
                 'rev': rev,
                 'clz': clz,
                 'uxtab': uxtab,
+                'bkpt': bkpt,
                 }
 
 mnemo_condm1 = {'adds': add,