Skip to content

Commit

Permalink
[debug] Reserve the trigger in HwbpManual
Browse files Browse the repository at this point in the history
After riscv-collab/riscv-openocd#1111 is merged,
the registers a user wishes to have direct control of should be
reserved.
This is the case in `HwbpManual`.

The test still works with older OpenOCD versions, since no exception
is generated when a command (`riscv reserve_trigger` in this case)
is not found.
  • Loading branch information
en-sc committed Aug 7, 2024
1 parent 68c70f5 commit 8cc4918
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions debug/gdbserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,8 @@ def test(self):
self.gdb.p("$tdata1=0")
tselect += 1

self.gdb.command(f"monitor riscv reserve_trigger {tselect}")

# The breakpoint should be hit exactly 2 times.
for _ in range(2):
output = self.gdb.c(ops=2)
Expand Down

0 comments on commit 8cc4918

Please sign in to comment.