[Lldb-commits] [lldb] [lldb-dap] Enabling instruction breakpoint support to lldb-dap. (PR #105278)
Adrian Vogelsgesang via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 21 18:12:30 PDT 2024
================
@@ -4046,6 +4048,181 @@ void request__testGetTargetBreakpoints(const llvm::json::Object &request) {
g_dap.SendJSON(llvm::json::Value(std::move(response)));
}
+// SetInstructionBreakpoints request; value of command field is
+// 'setInstructionBreakpoints'. Replaces all existing instruction breakpoints.
+// Typically, instruction breakpoints would be set from a disassembly window. To
+// clear all instruction breakpoints, specify an empty array. When an
+// instruction breakpoint is hit, a `stopped` event (with reason `instruction
+// breakpoint`) is generated. Clients should only call this request if the
+// corresponding capability `supportsInstructionBreakpoints` is true. interface
+// SetInstructionBreakpointsRequest extends Request {
+// command: 'setInstructionBreakpoints';
+// arguments: SetInstructionBreakpointsArguments;
+// }
+// interface SetInstructionBreakpointsArguments {
+// The instruction references of the breakpoints
+// breakpoints: InstructionBreakpoint[];
+// }
+// "InstructionBreakpoint ": {
+// "type": "object",
+// "description": "Properties of a breakpoint passed to the
+// setInstructionBreakpoints request.", "properties": {
+// "instructionReference": {
+// "type": "string",
+// "description": "The instruction reference of the breakpoint.
+// This should be a memory or instruction pointer reference from an
+// EvaluateResponse, Variable, StackFrame, GotoTarget, or Breakpoint."
+// },
+// "offset": {
+// "type": "number",
+// "description": "The offset from the instruction reference.
+// This can be negative."
+// },
+// "condition": {
+// "type": "string",
+// "description": "An expression for conditional breakpoints.
+// It is only honored by a debug adapter if the corresponding capability
+// supportsConditionalBreakpoints` is true."
+// },
+// "hitCondition": {
+// "type": "string",
+// "description": "An expression that controls how many hits of the
+// breakpoint are ignored. The debug adapter is expected to interpret the
+// expression as needed. The attribute is only honored by a debug adapter
+// if the corresponding capability `supportsHitConditionalBreakpoints` is
+// true."
+// },
+// }
+// interface SetInstructionBreakpointsResponse extends Response {
+// body: {
+// Information about the breakpoints. The array elements correspond to the
+// elements of the `breakpoints` array.
+// breakpoints: Breakpoint[];
+// };
+// }
----------------
vogelsgesang wrote:
we usually copy the JSON schema documentation into the comments, not the TypeScript interface.
See https://github.com/microsoft/debug-adapter-protocol/blob/main/debugAdapterProtocol.json
https://github.com/llvm/llvm-project/pull/105278
More information about the lldb-commits
mailing list