Skip to content

Commit aa4c995

Browse files
authored
Merge pull request #45 from SWW13/arm-cortex-m
Add ARM Cortex-M support
2 parents af68925 + 07e7e4f commit aa4c995

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

archs/arm-cortex-m.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"""
2+
ARM Cortex-M support for GEF
3+
4+
To use, source this file *after* gef
5+
6+
Original PR: https://github.com/hugsy/gef/pull/651
7+
Author: SWW13
8+
"""
9+
10+
11+
@register_architecture
12+
class ARM_M(ARM):
13+
arch = "ARM-M"
14+
aliases = ("ARM-M", )
15+
16+
all_registers = ARM.all_registers[:-1] + ["$xpsr", ]
17+
flag_register = "$xpsr"
18+
flags_table = {
19+
31: "negative",
20+
30: "zero",
21+
29: "carry",
22+
28: "overflow",
23+
24: "thumb",
24+
}

0 commit comments

Comments
 (0)