Skip to content

Commit

Permalink
feat: Implement Hardware Watchpoints. Includes small fixes on breakpo…
Browse files Browse the repository at this point in the history
…ints code.
  • Loading branch information
as0ler authored and trufae committed Jan 8, 2025
1 parent 8fdcd4d commit 41479e1
Show file tree
Hide file tree
Showing 2 changed files with 390 additions and 40 deletions.
10 changes: 8 additions & 2 deletions src/agent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,14 @@ const commandHandlers = {
chcon: [sys.changeSelinuxContext, 'change selinux context'],
db: [breakpoints.setBreakpoint, 'list or add a native breakpoint', '[addr]'],
dbj: breakpoints.breakpointJson,
dbc: [breakpoints.setBreakpointCommand, 'associate an r2 command when the native breakpoint is hit', '[addr] [cmd]'],
dbs: [breakpoints.toggleBreakpoint, 'Enable/Disable a breakpoint', '[addr] [cmd]'],
dbwj: breakpoints.watchpointJson,
dbw: [breakpoints.setWatchpoint, 'list or add a native watchpoint', '[addr] [size] [r|w|rw]'],
'dbw-': [breakpoints.unsetWatchpoint, 'unset the native watchpoint in the given address', '[addr]'],
'dbw-*': [breakpoints.watchpointUnsetAll, 'unset all the breakpoints'],
'dbws': [breakpoints.toggleWatchpoint, 'Enable/Disable a watchpoint', '[addr]'],
dbwc: [breakpoints.setWatchpointCommand, 'associate an r2 command when the native watchpoint is hit', '[addr] [cmd]'],
dbc: [breakpoints.setBreakpointCommand, 'associate an r2 command when the native breakpoint is hit. It creates the breakpoint if it does not exist.', '[addr] [cmd]'],
dbs: [breakpoints.toggleBreakpoint, 'Enable/Disable a breakpoint', '[addr]'],
'db-': [breakpoints.unsetBreakpoint, 'unset the native breakpoint in the given address', '[addr]'],
'db-*': [breakpoints.breakpointUnsetAll, 'unset all the breakpoints'],
dc: [breakpoints.breakpointContinue, 'continue execution of the interrupted child'],
Expand Down
Loading

0 comments on commit 41479e1

Please sign in to comment.