target/riscv: Expose "priv" register for GDB
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest3 patches 3 repliesIn review
- v33 patches 8 repliesSuperseded
- v21 patch 7 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 1 patch | 1 reply | Superseded |
Changelog V2 from the cover letter
- Use PRV_H and PRV_S instead of integer literals
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | target/riscv: Tell gdbstub the correct number of CSRstarget/ | +2 | 0 replies | |
| 2/3 | target/riscv: Expose "priv" register for GDB for readsconfigure gdb-xml/ gdb-xml/ +1 more | +47 | 2 replies | |
| 3/3 | target/riscv: Make the priv register writable by GDBtarget/ | +9 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Bin Meng | Alistair Francis |
|---|---|---|
| 1/3 | R-b | R-b |
| 2/3 | R-b T-b | R-b |
| 3/3 | R-b T-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/3] target/riscv: Expose "priv" register for GDB
This series adds a new "priv" virtual register that reports the current privilege mode. This is helpful for debugging purposes because that information is not actually available in any of the real CSRs.
The third patch in this series makes the priv virtual register writitable. I'm not entirely sure this is a good idea, so I split it out into its own patch. In particular, this change will conflict with the hypervisor extension work which assumes that the privilege mode does not change in unexpected cases.
As pointed out in a previous version of this series, GDB actually contains some support already for the accessing the privilege mode via a virtual "priv" register, including to convert the values into human readable forms:
(gdb) info reg priv
priv 0x3 prv:3 [Machine]
Changlog V4:
- Fix typo in filename
Changlog V3:
- Break patch into series
- Make priv a virtual register
Changelog V2:
- Use PRV_H and PRV_S instead of integer literals
Jonathan Behrens (3)
target/riscv: Tell gdbstub the correct number of CSRs target/riscv: Expose priv register for GDB for reads target/riscv: Make the priv register writable by GDB
configure | 4 ++-- gdb-xml/riscv-32bit-virtual.xml | 11 +++++++++++ gdb-xml/riscv-64bit-virtual.xml | 11 +++++++++++ target/riscv/gdbstub.c | 36 ++++++++++++++++++++++++++++++++++-- 4 files changed, 58 insertions(+), 4 deletions(-)