Conversation
eb25f0b to
c472173
Compare
WyoTwT
commented
Apr 11, 2024
Owner
Author
There was a problem hiding this comment.
I don't feel comfortable with the undefined in the readMemory (line 73 below) but it felt like I was changing too many functions which is what these more surgical changes were supposed to avoid (instead of adding Context to readArguments).
1cc2bce to
dc5df23
Compare
Since the ReadMemory/WriteMemory may be dependent upon the DAPs, move into the adapter-capabilities.ts file. Signed-off-by: Thor Thayer <thor.thayer@ericsson.com>
dc5df23 to
25ce242
Compare
Comment on lines
+141
to
+143
| readMemory?(session: vscode.DebugSession, params: ReadMemoryArguments, context: Context): Promise<ReadMemoryResult>; | ||
|
|
||
| writeMemory?(session: vscode.DebugSession, params: WriteMemoryArguments, context: Context): Promise<WriteMemoryResult>; |
There was a problem hiding this comment.
In other cases, the context is optional; why is it required here?
Owner
Author
There was a problem hiding this comment.
Whoops. Good catch. Thanks!
|
|
||
| protected showContexts = () => { | ||
| if (this.props.contexts.length === 0) { | ||
| return false; |
There was a problem hiding this comment.
undefined would be more natural here.
Populate the Context Dropdown from the different debug Contexts if available so different DAPs can be addressed. Add an optional Context to queries so the query can be directed to the appropriate handler. Add support for cdt-amalgamator. Signed-off-by: Thor Thayer <thor.thayer@ericsson.com>
Match current context id with one of the elements of the Contexts array. Signed-off-by: Thor Thayer <thor.thayer@ericsson.com>
Add new conditional for context menu showing Memory Inspector for a variable because some DAPs may not support it. Signed-off-by: Thor Thayer <thor.thayer@ericsson.com>
25ce242 to
a80eb95
Compare
Owner
Author
|
Since this is a local draft PR, I'm closing it. |
Owner
Author
|
Since this is a local draft PR, I'm closing it. See upstream PR: |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What it does
This PR addresses Issue 67.
In a system with multiple children such as the
cdt-gdb-amalgamator, the Memory Inspector needs a way to select the correct context (as thecdt-gdb-vscodeMemory Browser does).This PR has a dependency on
cdt-gdb-amalgamatorPR 20 which puts the assignment of the Child IDs in thecdt-gdb-amalgamatorinstead of the Memory Inspector and also uses thereadMemorysince the data returned is in the correct format for Memory Inspector.How to test
Run this branch of the
vscode-memory-inspectorwith the mainlinecdt-gdb-vscodeandcdt-gdb-adapteralong with the modifiedcdt-gdb-amalgamatorin PR 20](eclipse-cdt-cloud/cdt-amalgamator#20).Start the debugger as a Desktop Extension. In the newly launched VSCode, open the cdt-amalgamator/sampleWorkspace folder and place a breakpoint at the first instruction in empty1.c's main and empty2.c's main. Start debugging with
Amalgamator Exampleand you should run to the breakpoints. Open a new Memory Inspector with the Command Palette'sMemory: Show Memory Inspectorto open a new view. The dropdown should list bothproc1andproc2listed in the Call Stack.Review checklist
Reminder for reviewers