-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add watchpoints and CSR support to GDBStub #14
base: main
Are you sure you want to change the base?
Add watchpoints and CSR support to GDBStub #14
Conversation
Calculating the size (as well as isEmpty) on a subset of a SortedSet is a somewhat expensive operation that involves walking the tree of the parent set (since a subset object is merely a thin wrapper around the full set). It is not O(1) like you might expect. This removes the isEmpty() call, so we walk the tree one fewer times.
Adds support for specifying an XML target description. Adds support for the p/P packets to read/write a single register. These combined allow GDB to read/write floating point and csr registers.
I meant to squash those commits, oh well Also I had a couple questions
|
Very very cool, will have a closer look soon!
|
Ah that's why it's called Perhaps its worth pulling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Sorry for the wait, I had finally caught the corona, and had to catch up on a couple of other things first, after that. Just a few minor things I've commented on.
I'm hoping to do some rough perf tests next week (currently on mobile internet with data limit because my ISP is a derp, so don't want to let gradle loose).
I'll give it a spin this weekend, and unless I stumble upon something I'm not sure how to fix, I'll merge. Thanks again for your work on the debugger front, I really appreciate it a lot! |
Yet this was never merged |
Co-authored-by: ja2142 <[email protected]>
This PR adds support for GDB watchpoints to Sedna's GDB stub. It also adds support for floating point registers and CSRs. That even includes the Sedna specific
0xbc0
CSR for switching to 32 bit mode.Implementation notes:
The watchpoints are stored and looked up from a simple array. It should have very low overhead. (Also this is what QEMU does.) If we wanted to support having lots of watchpoints with lookups faster than
O(n)
, we would need an Interval Tree. I partially implemented one, but I don't think it's worth the effort, considering it will perform worse due to overhead with real world usage.Also there are various quirks with 32 bit specific registers. In general, GDB doesn't support switching CPU modes so we just have to pretend the CPU is always in 64 bit mode