Skip to content

Commit e5123db

Browse files
committed
Add ARMOpenOCD arch
1 parent a669c30 commit e5123db

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

archs/arm-openocd.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""
2+
ARM through OpenOCD support for GEF
3+
4+
To use, source this file *after* gef
5+
6+
Author: Grazfather
7+
"""
8+
9+
class ARMOpenOCD(ARM):
10+
arch = "ARMOpenOCD"
11+
aliases = ("ARMOpenOCD",)
12+
all_registers = ("$r0", "$r1", "$r2", "$r3", "$r4", "$r5", "$r6",
13+
"$r7", "$r8", "$r9", "$r10", "$r11", "$r12", "$sp",
14+
"$lr", "$pc", "$xPSR")
15+
flag_register = "$xPSR"
16+
@staticmethod
17+
def supports_gdb_arch(arch: str) -> Optional[bool]:
18+
if "arm" in arch and arch.endswith("-m"):
19+
return True
20+
return None

0 commit comments

Comments
 (0)