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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

gdb: Expose CHERI SCRs via the GDB stub #261

wants to merge 4 commits into from

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
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.
@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
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