Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 support for
qXfer:libraries{,-svr4}:read
#142Add support for
qXfer:libraries{,-svr4}:read
#142Changes from all commits
c8cc46f
4442035
648b39f
5f1f35b
9a29b11
8d4f1d3
8d9998b
c7d0b0f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Maybe it's not as part of this PR... but having another API force the user return "raw XML" (vs. having
gdbstub
generate it on-the-fly) seems a little unfortunate from a usability POV.e.g: In this case, I wonder if we could instead have an API that looks something like this instead:
Though, as I typed this out, I remembered that I basically had the same through process while reviewing #54, and after reviewing that thread... I think the implementation in
gdbstub
would get a bit too hairy (especially when considering how we'd need to handle non-zerooffset
requests...)Maybe a middle ground could be to keep the "raw XML" API, but also include some helper XML builders that would make it easier for end-users to generate the properly formatted XML they need to return?
e.g:
Under the hood, this could re-use the
ManagedVec
type https://github.com/daniel5151/gdbstub/blob/master/src/util/managed_vec.rsHmmm...
...but in any case, I don't think this is something that needs to happen as part of this PR.
I think adding this (and other) XML builders would be a workstream in its own right, and some more thinking is required on what I'd want maintain a cohesive-ish API across all the different kinds of XML that'd be getting generated.
TL;DR: feel free to ignore this comment - I basically just wrote it for future me 😅
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.
I think that this is a really good idea yeah, and I was wondering how bad it would be to prototype this. I like your idea of a
LibrariesSvr4XmlBuilder
as a sort of maximally general way of doing this so if raw XML were available it could be given but otherwise it's just as convenient to use the builder. The builder could also have a helper function to take all the raw parameters toget_libraries_svr4
plus a closure and do it all on-the-fly.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.
I am now tracking this and other instances of generating XML via #143