Skip to content

Commit

Permalink
service/dap: set instruction breakpoints (#2716)
Browse files Browse the repository at this point in the history
Support setting instruction breakpoints, this is newly supported in VS Code for the disassembly view.
  • Loading branch information
suzmue committed Oct 13, 2021
1 parent 7899e94 commit d1c888f
Show file tree
Hide file tree
Showing 3 changed files with 264 additions and 143 deletions.
11 changes: 11 additions & 0 deletions service/dap/daptest/client.go
Expand Up @@ -103,6 +103,7 @@ func (c *Client) ExpectInitializeResponseAndCapabilities(t *testing.T) *dap.Init
SupportsExceptionInfoRequest: true,
SupportsSetVariable: true,
SupportsFunctionBreakpoints: true,
SupportsInstructionBreakpoints: true,
SupportsEvaluateForHovers: true,
SupportsClipboardContext: true,
SupportsSteppingGranularity: true,
Expand Down Expand Up @@ -403,6 +404,16 @@ func (c *Client) SetFunctionBreakpointsRequest(breakpoints []dap.FunctionBreakpo
})
}

// SetInstructionBreakpointsRequest sends a 'setInstructionBreakpoints' request.
func (c *Client) SetInstructionBreakpointsRequest(breakpoints []dap.InstructionBreakpoint) {
c.send(&dap.SetInstructionBreakpointsRequest{
Request: *c.newRequest("setInstructionBreakpoints"),
Arguments: dap.SetInstructionBreakpointsArguments{
Breakpoints: breakpoints,
},
})
}

// StepBackRequest sends a 'stepBack' request.
func (c *Client) StepBackRequest() {
c.send(&dap.StepBackRequest{Request: *c.newRequest("stepBack")})
Expand Down

0 comments on commit d1c888f

Please sign in to comment.