Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

debug: fix HwbpManual test #557

Merged
merged 1 commit into from
May 31, 2024
Merged

Conversation

en-sc
Copy link
Collaborator

@en-sc en-sc commented May 23, 2024

HwbpManual test was broken:

  • Value read back from tselect was compared with tdata1 value.
    value = self.gdb.p("$tselect")
    if value == tdata1:
    break
    This resulted in the test being reported as not supported, after all the triggers were checked.
  • tdata1.type field was not set to mcontrol.
  • tselect value used to be changed by handle_reset and not restored.
    1:
    addi t0, t0, 1
    csrw CSR_TSELECT, t0
    csrw CSR_TDATA1, zero
    csrr t1, CSR_TSELECT
    beq t0, t1, 1b
  • Manual breakpoint used to be left behind.

HwbpManual test was broken:
* Value read back from `tselect` was compared with `tdata1` value.
https://github.com/riscv-software-src/riscv-tests/blob/408e461da11e0b298c4b69e587729532787212f5/debug/gdbserver.py#L701-L703
This resulted in the test being reported as not supported, after all the
triggers were checked.
* `tdata1.type` field was not set to `mcontrol`.
* `tselect` value used to be changed by `handle_reset` and not restored.
https://github.com/riscv-software-src/riscv-tests/blob/408e461da11e0b298c4b69e587729532787212f5/debug/programs/entry.S#L79-L84
* Manual breakpoint used to be left behind.

Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
@en-sc en-sc merged commit 8f9c68e into riscv-software-src:master May 31, 2024
2 checks passed
@en-sc en-sc deleted the en-sc/manual-hwbp branch May 31, 2024 13:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants