Skip to content

Conversation

@WardenGnaw
Copy link
Member

This allows OpenDebugAD7 to support the ReadMemoryRequest for DAP.

Copy link
Member

@gregg-miskelly gregg-miskelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for the protocol to be fully implemented.

@gregg-miskelly
Copy link
Member

internal class AD7DebugSession : DebugAdapterBase, IDebugPortNotify2, IDebugEventCallback2

Need to also send a ProcessEvent with PointerSize defined


Refers to: src/OpenDebugAD7/AD7DebugSession.cs:30 in dbd0fe3. [](commit_id = dbd0fe3, deletion_comment = False)

@gregg-miskelly
Copy link
Member

{

VariableManager.CreateVariable needs to populate the memoryReference


Refers to: src/OpenDebugAD7/AD7DebugSession.cs:31 in dbd0fe3. [](commit_id = dbd0fe3, deletion_comment = False)

@WardenGnaw WardenGnaw marked this pull request as draft August 18, 2020 20:26
@WardenGnaw
Copy link
Member Author

WardenGnaw commented Aug 18, 2020

Converting to Draft. I need to finish up the messaging on the VS Code side to fully test this.

Won't block for VS Code UI since this can be used in VS scenarios.

image

 1> [DebugAdapter] --> C (evaluate-35): {"type":"request","command":"evaluate","arguments":{"context":"hover","expression":"&i","frameId":1000,"noSideEffects":true,"timeout":2000},"seq":35}
 1> [DebugAdapter] <--   R (evaluate-35) [15 ms]: {"type":"response","request_seq":35,"success":true,"command":"evaluate","body":{"result":"0x61febc","type":"int *","variablesReference":1002,"memoryReference":"0x0061febc"},"seq":68}
 1> [DebugAdapter] --> C (readMemory-36): {"type":"request","command":"readMemory","arguments":{"memoryReference":"0x0061febc","offset":-735,"count":2205},"seq":36}
 1> [DebugAdapter] <--   R (readMemory-36) [12 ms]: {"type":"response","request_seq":36,"success":true,"command":"readMemory","body":{"address":"0x61FBDD","unreadableBytes":1145,"data":"FGwAsAAAAHACbAAAAGwAfwAAALB5bAB/AAAAAABsALgUbAAAAAAAAABsAMYAAMZ............"},"seq":69}

This allows OpenDebugAD7 to support the ReadMemoryRequest for DAP.

This also implements MemoryReferences in EvaluateRequest.
@WardenGnaw WardenGnaw force-pushed the dev/waan/readMemory branch from dbd0fe3 to 5e9669a Compare August 25, 2020 00:30
@WardenGnaw
Copy link
Member Author

@gregg-miskelly Do we want to add memoryReference to all variables created by VariableManager.CreateVariable?

Used in:
HandleVariablesRequestAsync

which also calls
VariablesFromFrame

@gregg-miskelly
Copy link
Member

gregg-miskelly commented Aug 25, 2020

@gregg-miskelly Do we want to add memoryReference to all variables created by VariableManager.CreateVariable?

I think you would want to add them to any variable where GetMemoryContext succeeds. Just like what you are doing in HandleEvaluateRequestAsync. Probably worth pulling that out into a helper.

Copy link
Member

@gregg-miskelly gregg-miskelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM.

@WardenGnaw WardenGnaw marked this pull request as ready for review September 2, 2020 01:30
@WardenGnaw WardenGnaw merged commit e1b8dda into master Sep 2, 2020
@WardenGnaw WardenGnaw deleted the dev/waan/readMemory branch September 4, 2020 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants