Skip to content

Commit

Permalink
wip bmp
Browse files Browse the repository at this point in the history
  • Loading branch information
Grazfather committed Aug 24, 2023
1 parent 3aaf853 commit 16f140a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
23 changes: 23 additions & 0 deletions archs/arm-blackmagicprobe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""
ARM through the Black Magic Probe support for GEF
To use, source this file *after* gef
Author: Grazfather
"""

from typing import Optional


class ARMBlackMagicProbe(ARM):
arch = "ARMBlackMagicProbe"
aliases = ("ARMBlackMagicProbe",)
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
10 changes: 9 additions & 1 deletion archs/arm-openocd.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@
Author: Grazfather
"""

from typing import Optional


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",)
"$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 16f140a

Please sign in to comment.