Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upProposal: Support memory reference breakpoints #102
Comments
|
For some high-level languages, data breakpoints can be done, but they cannot operate on memory addresses - only on variables and children. It would be nice to have that accommodated. |
|
@int19h These memory reference breakpoints are not intended as Data Breakpoints, but execution breakpoints (i.e. setting a breakpoint on a specific instruction). I can update the description to indicate that this is for when code corresponding to the memory location is executed. Or would something else make this clearer? I believe that databreakpoints in the protocol already support being based off of variables? So supporting memory reference based databreakpoints would be a separate proposal to allow adding a databp based directly on a memory reference/user supplied address/ |
|
My apologies - I misunderstood the meaning of "memory reference" here. I think confusion stemmed from me mentally conflating it with "variable reference". And yes, you're right, data breakpoints are already in the spec. |
|
@auott thanks for the proposals. General feedback: please never combine multiple requests into one. Discussions jumping between the different features are hard to follow and it is impossible to drive the requests through the different phases in a single issue (and state). I suggest that you move the "Stepping Granularities" feature into a separate issue (because the existing discussion here targets "Memory Reference Breakpoints"). I will move my comments/questions to the new issue. |
|
The proposal looks good to me, however it seems to be very specific to s small number of debuggers. So I do not see big pressure to rush this into DAP. Has the proposal already proved its soundness in a real implementation? How mature is it? Some comments/questions:
|
Yep! I have a working end to end implementation in VS.
Yes, the memory references used here are intended to be ones that were previously supplied by the DA.
Is there anything else I should add directly into the proposal around this?
How about InstructionBreakpoint? For an adapter to support this, I think it is fair to say that they would have to have some concept of an 'instruction' that would exist at the given memory reference. |
|
The current DAP spec is a bit confusing on what memory references are for, in general. For variables, it says:
This implies that it's strictly for referencing code. But then for "evaluate":
So no longer just function pointers, but any pointers. And "readMemory" doesn't say anything about what the bytes might be at all. |
|
@int19h To be clear - I don't mean that requesting a BP based on any memory reference provided by the DA should succeed, but you could always try to request it. |
|
I wonder if it would be more clear what these are expected to be used for if we added text like "typically these breakpoints would be set from a disassembly window" to the description. |
|
@auott thanks for your comments.
|
|
I think |
|
@auott since you are using the proposed feature already I assume that you have an updated JSON schema for it. Could you please submit a PR for that? |
|
PR submitted: #111 |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Memory reference breakpoints allow setting a breakpoint based off of memory reference previously provided by an adapter.
CC: @andrewcrawley, @weinand