Skip to content

Commit

Permalink
Add ARMOpenOCD arch
Browse files Browse the repository at this point in the history
  • Loading branch information
Grazfather committed Jan 26, 2024
1 parent a669c30 commit e5123db
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions archs/arm-openocd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
ARM through OpenOCD support for GEF
To use, source this file *after* gef
Author: Grazfather
"""

class ARMOpenOCD(ARM):
arch = "ARMOpenOCD"
aliases = ("ARMOpenOCD",)
all_registers = ("$r0", "$r1", "$r2", "$r3", "$r4", "$r5", "$r6",
"$r7", "$r8", "$r9", "$r10", "$r11", "$r12", "$sp",
"$lr", "$pc", "$xPSR")
flag_register = "$xPSR"
@staticmethod
def supports_gdb_arch(arch: str) -> Optional[bool]:
if "arm" in arch and arch.endswith("-m"):
return True
return None

0 comments on commit e5123db

Please sign in to comment.