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

Support x packet for binary memory read. #163

Open
daniel5151 opened this issue Jan 6, 2025 · 0 comments
Open

Support x packet for binary memory read. #163

daniel5151 opened this issue Jan 6, 2025 · 0 comments
Labels
API-non-breaking Non-breaking API change good first issue Good for newcomers

Comments

@daniel5151
Copy link
Owner

GDB recently (Dec 2024) gained support for this packet, via bminor/binutils-gdb@e16e638

Much like #82, which implemented x's sibling packet (X - for binary memory writes), this should be a simple, straightforward packet to add support for. It will simply hook into the existing Target-facing read_memory methods, and work as expected.

One other minor thing to keep in mind: we'll also want to add a new fn use_x_packet(&self) -> bool method to Target, in order to give space-constrained users the ability to opt-out of support for this packet, just as #82 added use_x_upcase_packet when it implemented support for X.


Note that LLDB has already supported this packet for quite a while now. See https://lldb.llvm.org/resources/lldbgdbremote.html#x-binary-memory-read

Fortunately, GDB and LLDB share the exact same syntax and semantics for this packet, so no extra handling will be required to maintain compatibility between the two clients.

@daniel5151 daniel5151 added good first issue Good for newcomers API-non-breaking Non-breaking API change labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API-non-breaking Non-breaking API change good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant