@@ -445,6 +445,34 @@ struct SetExceptionBreakpointsArguments {
445445 // / capability `supportsExceptionOptions` is true.
446446 std::optional<std::vector<ExceptionOptions>> exceptionOptions;
447447};
448+ bool fromJSON (const llvm::json::Value &, SetExceptionBreakpointsArguments &,
449+ llvm::json::Path);
450+
451+ // / Response to `setExceptionBreakpoints` request.
452+ // / The response contains an array of Breakpoint objects with information about
453+ // / each exception breakpoint or filter. The Breakpoint objects are in the same
454+ // / order as the elements of the filters, filterOptions, exceptionOptions arrays
455+ // / given as arguments. If both filters and filterOptions are given, the
456+ // / returned array must start with filters information first, followed by
457+ // / filterOptions information.
458+ // / The verified property of a Breakpoint object signals whether the exception
459+ // / breakpoint or filter could be successfully created and whether the condition
460+ // / is valid. In case of an error the message property explains the problem. The
461+ // / id property can be used to introduce a unique ID for the exception
462+ // / breakpoint or filter so that it can be updated subsequently by sending
463+ // / breakpoint events. For backward compatibility both the breakpoints array and
464+ // / the enclosing body are optional. If these elements are missing a client is
465+ // / not able to show problems for individual exception breakpoints or filters.
466+ struct SetExceptionBreakpointsResponseBody {
467+ // / Information about the exception breakpoints or filters.
468+ // / The breakpoints returned are in the same order as the elements of the
469+ // / `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments.
470+ // / If both `filters` and `filterOptions` are given, the returned array must
471+ // / start with `filters` information first, followed by `filterOptions`
472+ // / information.
473+ std::vector<Breakpoint> breakpoints;
474+ };
475+ llvm::json::Value toJSON (const SetExceptionBreakpointsResponseBody &);
448476
449477// / Arguments for `setInstructionBreakpoints` request.
450478struct SetInstructionBreakpointsArguments {
@@ -462,6 +490,88 @@ struct SetInstructionBreakpointsResponseBody {
462490};
463491llvm::json::Value toJSON (const SetInstructionBreakpointsResponseBody &);
464492
493+ // / Arguments for `dataBreakpointInfo` request.
494+ struct DataBreakpointInfoArguments {
495+ // / Reference to the variable container if the data breakpoint is requested
496+ // / for a child of the container. The `variablesReference` must have been
497+ // / obtained in the current suspended state.See 'Lifetime of Object
498+ // / References' in the Overview section for details.
499+ std::optional<int64_t > variablesReference;
500+
501+ // / The name of the variable's child to obtain data breakpoint information
502+ // / for. If `variablesReference` isn't specified, this can be an expression,
503+ // / or an address if `asAddress` is also true.
504+ std::string name;
505+
506+ // / When `name` is an expression, evaluate it in the scope of this stack
507+ // / frame. If not specified, the expression is evaluated in the global scope.
508+ // / When `asAddress` is true, the `frameId` is ignored.
509+ std::optional<int64_t > frameId;
510+
511+ // / If specified, a debug adapter should return information for the range of
512+ // / memory extending `bytes` number of bytes from the address or variable
513+ // / specified by `name`. Breakpoints set using the resulting data ID should
514+ // / pause on data access anywhere within that range.
515+ // / Clients may set this property only if the `supportsDataBreakpointBytes`
516+ // / capability is true.
517+ std::optional<int64_t > bytes;
518+
519+ // / If `true`, the `name` is a memory address and the debugger should
520+ // / interpret it as a decimal value, or hex value if it is prefixed with `0x`.
521+ // / Clients may set this property only if the `supportsDataBreakpointBytes`
522+ // / capability is true.
523+ std::optional<bool > asAddress;
524+
525+ // / The mode of the desired breakpoint. If defined, this must be one of the
526+ // / `breakpointModes` the debug adapter advertised in its `Capabilities`.
527+ std::optional<std::string> mode;
528+ };
529+ bool fromJSON (const llvm::json::Value &, DataBreakpointInfoArguments &,
530+ llvm::json::Path);
531+
532+ // / Response to `dataBreakpointInfo` request.
533+ struct DataBreakpointInfoResponseBody {
534+ // / An identifier for the data on which a data breakpoint can be registered
535+ // / with the `setDataBreakpoints` request or null if no data breakpoint is
536+ // / available. If a `variablesReference` or `frameId` is passed, the `dataId`
537+ // / is valid in the current suspended state, otherwise it's valid
538+ // / indefinitely. See 'Lifetime of Object References' in the Overview section
539+ // / for details. Breakpoints set using the `dataId` in the
540+ // / `setDataBreakpoints` request may outlive the lifetime of the associated
541+ // / `dataId`.
542+ std::optional<std::string> dataId;
543+
544+ // / UI string that describes on what data the breakpoint is set on or why a
545+ // / data breakpoint is not available.
546+ std::string description;
547+
548+ // / Attribute lists the available access types for a potential data
549+ // / breakpoint. A UI client could surface this information.
550+ std::optional<std::vector<DataBreakpointAccessType>> accessTypes;
551+
552+ // / Attribute indicates that a potential data breakpoint could be persisted
553+ // / across sessions.
554+ std::optional<bool > canPersist;
555+ };
556+ llvm::json::Value toJSON (const DataBreakpointInfoResponseBody &);
557+
558+ // / Arguments for `setDataBreakpoints` request.
559+ struct SetDataBreakpointsArguments {
560+ // / The contents of this array replaces all existing data breakpoints. An
561+ // / empty array clears all data breakpoints.
562+ std::vector<DataBreakpointInfo> breakpoints;
563+ };
564+ bool fromJSON (const llvm::json::Value &, SetDataBreakpointsArguments &,
565+ llvm::json::Path);
566+
567+ // / Response to `setDataBreakpoints` request.
568+ struct SetDataBreakpointsResponseBody {
569+ // / Information about the data breakpoints. The array elements correspond to
570+ // / the elements of the input argument `breakpoints` array.
571+ std::vector<Breakpoint> breakpoints;
572+ };
573+ llvm::json::Value toJSON (const SetDataBreakpointsResponseBody &);
574+
465575} // namespace lldb_dap::protocol
466576
467577#endif
0 commit comments