Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

gdb: Expose CHERI SCRs via the GDB stub #261

Merged
merged 4 commits into from
Dec 5, 2024
Merged

gdb: Expose CHERI SCRs via the GDB stub #261

merged 4 commits into from
Dec 5, 2024

Conversation

bsdjhb
Copy link
Contributor

@bsdjhb bsdjhb commented Sep 3, 2024

This does not expose PCC and DDC in the new SCRs register group since those are already in the general purpose CHERI group.

@bsdjhb bsdjhb requested a review from jrtc27 September 3, 2024 15:48
int index;
const char *name;
bool code;
} scrs[] = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplicates scr_info in cheri_op_helper.c a bit. However, using all-lowercase names is more consistent with other registers exported via GDB.

target/riscv/gdbstub.c Outdated Show resolved Hide resolved
target/riscv/gdbstub.c Outdated Show resolved Hide resolved
target/riscv/gdbstub.c Outdated Show resolved Hide resolved
@bsdjhb
Copy link
Contributor Author

bsdjhb commented Sep 3, 2024

This also fixes CSRs exported by GDB to use their name instead of 'csrXXX'

@bsdjhb bsdjhb requested a review from jrtc27 September 4, 2024 14:14
Copy link
Member

@jrtc27 jrtc27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just waiting for the Jenkins rerun to pass

This should fix the use of CSR names in the GDB stub.
This matches the style for all other RISC-V registers including CSRs
and avoids a weird collision with STDC which zlib defines as an alias
of __STDC__.
This does not expose PCC and DDC in the new SCRs register group since
those are already in the general purpose CHERI group.
@jrtc27 jrtc27 merged commit a2452e0 into dev Dec 5, 2024
50 of 51 checks passed
@jrtc27 jrtc27 deleted the riscv_scr_gdb branch December 5, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants