-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[lldb-dap] Use protocol types for ReadMemory request #144552
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ba920b6
[lldb-dap] use protocol types for read memory
da-viper 1df2622
[lldb-dap] add unit tests.
da-viper 71f027c
[lldb-dap] add review changes
da-viper a2ba08c
[lldb-dap] add review changes
da-viper 3f870ef
[lldb-dap] remove commented code
da-viper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -742,6 +742,42 @@ bool fromJSON(const llvm::json::Value &, DisassembledInstruction &, | |
| llvm::json::Path); | ||
| llvm::json::Value toJSON(const DisassembledInstruction &); | ||
|
|
||
| /// Arguments for `readMemory` request. | ||
| struct ReadMemoryArguments { | ||
da-viper marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| /// Memory reference to the base location from which data should be read. | ||
| std::string memoryReference; | ||
|
|
||
| /// Offset (in bytes) to be applied to the reference location before reading | ||
| /// data. Can be negative. | ||
| std::optional<int64_t> offset; | ||
|
||
|
|
||
| /// Number of bytes to read at the specified location and offset. | ||
| uint64_t count; | ||
| }; | ||
| bool fromJSON(const llvm::json::Value &, ReadMemoryArguments &, | ||
| llvm::json::Path); | ||
|
|
||
| /// Response to `readMemory` request. | ||
| struct ReadMemoryResponse { | ||
| /// The address of the first byte of data returned. | ||
da-viper marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| /// Treated as a hex value if prefixed with `0x`, or as a decimal value | ||
| /// otherwise. | ||
| std::string address; | ||
da-viper marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| /// The number of unreadable bytes encountered after the last successfully | ||
| /// read byte. | ||
| /// This can be used to determine the number of bytes that should be skipped | ||
| /// before a subsequent `readMemory` request succeeds. | ||
| std::optional<uint64_t> unreadableBytes; | ||
da-viper marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| /// The bytes read from memory, encoded using base64. If the decoded length | ||
| /// of `data` is less than the requested `count` in the original `readMemory` | ||
| /// request, and `unreadableBytes` is zero or omitted, then the client should | ||
| /// assume it's reached the end of readable memory. | ||
| std::optional<std::string> data; | ||
da-viper marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }; | ||
| llvm::json::Value toJSON(const ReadMemoryResponse &); | ||
|
|
||
| } // namespace lldb_dap::protocol | ||
|
|
||
| #endif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.