microsoft / debug-adapter-protocol

Defines a common protocol for debug adapters.
https://microsoft.github.io/debug-adapter-protocol/
Other
1.44k stars 131 forks source link

Help needed : Disassembly a C/C++ frame (function) #470

Closed royqh1979 closed 4 months ago

royqh1979 commented 8 months ago

In my DAP client, I want to disassembly a selected frame from the stack. A disassemble request need "memoryReference" and "instructionCount" as the arguments.

I can get the "memoryReference" from StackFrame's "instructionPointerReference", but where could I find the "instructionCount" ?

Thanks for the reply!

connor4312 commented 8 months ago

instructionCount is just how many instructions you want the adapter to return to you as a client. This is based on how your UI behaves, for example you might guesstimate this based on the window size and height of disassembled rows to get enough data to fill the user's screen.

connor4312 commented 4 months ago

Let us know if you have other questions.