2020#ifndef LLDB_TOOLS_LLDB_DAP_PROTOCOL_PROTOCOL_TYPES_H
2121#define LLDB_TOOLS_LLDB_DAP_PROTOCOL_PROTOCOL_TYPES_H
2222
23- #include " lldb/lldb-enumerations.h"
2423#include " llvm/ADT/DenseSet.h"
2524#include " llvm/Support/JSON.h"
2625#include < cstdint>
@@ -57,8 +56,12 @@ struct ExceptionBreakpointsFilter {
5756};
5857llvm::json::Value toJSON (const ExceptionBreakpointsFilter &);
5958
60- FLAGS_ENUM (ColumnType){eColumnTypeString, eColumnTypeNumber, eColumnTypeBoolean,
61- eColumnTypeTimestamp};
59+ enum ColumnType : unsigned {
60+ eColumnTypeString,
61+ eColumnTypeNumber,
62+ eColumnTypeBoolean,
63+ eColumnTypeTimestamp
64+ };
6265
6366// / A ColumnDescriptor specifies what module attribute to show in a column of
6467// / the modules view, how to format it, and what the column’s label should be.
@@ -87,23 +90,27 @@ llvm::json::Value toJSON(const ColumnDescriptor &);
8790
8891// / Names of checksum algorithms that may be supported by a debug adapter.
8992// / Values: ‘MD5’, ‘SHA1’, ‘SHA256’, ‘timestamp’.
90- FLAGS_ENUM (ChecksumAlgorithm){eChecksumAlgorithmMD5, eChecksumAlgorithmSHA1,
91- eChecksumAlgorithmSHA256,
92- eChecksumAlgorithmTimestamp};
93+ enum ChecksumAlgorithm : unsigned {
94+ eChecksumAlgorithmMD5,
95+ eChecksumAlgorithmSHA1,
96+ eChecksumAlgorithmSHA256,
97+ eChecksumAlgorithmTimestamp
98+ };
9399llvm::json::Value toJSON (const ChecksumAlgorithm &);
94100
95101// / Describes one or more type of breakpoint a BreakpointMode applies to. This
96102// / is a non-exhaustive enumeration and may expand as future breakpoint types
97103// / are added.
98- FLAGS_ENUM (BreakpointModeApplicability){
99- // / In `SourceBreakpoint`'s.
100- eBreakpointModeApplicabilitySource,
101- // / In exception breakpoints applied in the `ExceptionFilterOptions`.
102- eBreakpointModeApplicabilityException,
103- // / In data breakpoints requested in the `DataBreakpointInfo` request.
104- eBreakpointModeApplicabilityData,
105- // / In `InstructionBreakpoint`'s.
106- eBreakpointModeApplicabilityInstruction};
104+ enum BreakpointModeApplicability : unsigned {
105+ // / In `SourceBreakpoint`'s.
106+ eBreakpointModeApplicabilitySource,
107+ // / In exception breakpoints applied in the `ExceptionFilterOptions`.
108+ eBreakpointModeApplicabilityException,
109+ // / In data breakpoints requested in the `DataBreakpointInfo` request.
110+ eBreakpointModeApplicabilityData,
111+ // / In `InstructionBreakpoint`'s.
112+ eBreakpointModeApplicabilityInstruction
113+ };
107114llvm::json::Value toJSON (const BreakpointModeApplicability &);
108115
109116// / A `BreakpointMode` is provided as a option when setting breakpoints on
@@ -126,101 +133,101 @@ struct BreakpointMode {
126133llvm::json::Value toJSON (const BreakpointMode &);
127134
128135// / Debug Adapter Features flags supported by lldb-dap.
129- FLAGS_ENUM ( AdapterFeature) {
130- // / The debug adapter supports ANSI escape sequences in styling of
131- // / `OutputEvent.output` and `Variable.value` fields.
132- eAdapterFeatureANSIStyling,
133- // / The debug adapter supports the `breakpointLocations` request.
134- eAdapterFeatureBreakpointLocationsRequest,
135- // / The debug adapter supports the `cancel` request.
136- eAdapterFeatureCancelRequest,
137- // / The debug adapter supports the `clipboard` context value in the
138- // / `evaluate` request.
139- eAdapterFeatureClipboardContext,
140- // / The debug adapter supports the `completions` request.
141- eAdapterFeatureCompletionsRequest,
142- // / The debug adapter supports conditional breakpoints.
143- eAdapterFeatureConditionalBreakpoints,
144- // / The debug adapter supports the `configurationDone` request.
145- eAdapterFeatureConfigurationDoneRequest,
146- // / The debug adapter supports the `asAddress` and `bytes` fields in the
147- // / `dataBreakpointInfo` request.
148- eAdapterFeatureDataBreakpointBytes,
149- // / The debug adapter supports data breakpoints.
150- eAdapterFeatureDataBreakpoints,
151- // / The debug adapter supports the delayed loading of parts of the stack,
152- // / which requires that both the `startFrame` and `levels` arguments and the
153- // / `totalFrames` result of the `stackTrace` request are supported.
154- eAdapterFeatureDelayedStackTraceLoading,
155- // / The debug adapter supports the `disassemble` request.
156- eAdapterFeatureDisassembleRequest,
157- // / The debug adapter supports a (side effect free) `evaluate` request for
158- // / data hovers.
159- eAdapterFeatureEvaluateForHovers,
160- // / The debug adapter supports `filterOptions` as an argument on the
161- // / `setExceptionBreakpoints` request.
162- eAdapterFeatureExceptionFilterOptions,
163- // / The debug adapter supports the `exceptionInfo` request.
164- eAdapterFeatureExceptionInfoRequest,
165- // / The debug adapter supports `exceptionOptions` on the
166- // / `setExceptionBreakpoints` request.
167- eAdapterFeatureExceptionOptions,
168- // / The debug adapter supports function breakpoints.
169- eAdapterFeatureFunctionBreakpoints,
170- // / The debug adapter supports the `gotoTargets` request.
171- eAdapterFeatureGotoTargetsRequest,
172- // / The debug adapter supports breakpoints that break execution after a
173- // / specified number of hits.
174- eAdapterFeatureHitConditionalBreakpoints,
175- // / The debug adapter supports adding breakpoints based on instruction
176- // / references.
177- eAdapterFeatureInstructionBreakpoints,
178- // / The debug adapter supports the `loadedSources` request.
179- eAdapterFeatureLoadedSourcesRequest,
180- // / The debug adapter supports log points by interpreting the `logMessage`
181- // / attribute of the `SourceBreakpoint`.
182- eAdapterFeatureLogPoints,
183- // / The debug adapter supports the `modules` request.
184- eAdapterFeatureModulesRequest,
185- // / The debug adapter supports the `readMemory` request.
186- eAdapterFeatureReadMemoryRequest,
187- // / The debug adapter supports restarting a frame.
188- eAdapterFeatureRestartFrame,
189- // / The debug adapter supports the `restart` request. In this case a client
190- // / should not implement `restart` by terminating and relaunching the
191- // / adapter but by calling the `restart` request.
192- eAdapterFeatureRestartRequest,
193- // / The debug adapter supports the `setExpression` request.
194- eAdapterFeatureSetExpression,
195- // / The debug adapter supports setting a variable to a value.
196- eAdapterFeatureSetVariable,
197- // / The debug adapter supports the `singleThread` property on the execution
198- // / requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`,
199- // / `stepBack`).
200- eAdapterFeatureSingleThreadExecutionRequests,
201- // / The debug adapter supports stepping back via the `stepBack` and
202- // / `reverseContinue` requests.
203- eAdapterFeatureStepBack,
204- // / The debug adapter supports the `stepInTargets` request.
205- eAdapterFeatureStepInTargetsRequest,
206- // / The debug adapter supports stepping granularities (argument
207- // / `granularity`) for the stepping requests.
208- eAdapterFeatureSteppingGranularity,
209- // / The debug adapter supports the `terminate` request.
210- eAdapterFeatureTerminateRequest,
211- // / The debug adapter supports the `terminateThreads` request.
212- eAdapterFeatureTerminateThreadsRequest,
213- // / The debug adapter supports the `suspendDebuggee` attribute on the
214- // / `disconnect` request.
215- eAdapterFeatureSuspendDebuggee,
216- // / The debug adapter supports a `format` attribute on the `stackTrace`,
217- // / `variables`, and `evaluate` requests.
218- eAdapterFeatureValueFormattingOptions,
219- // / The debug adapter supports the `writeMemory` request.
220- eAdapterFeatureWriteMemoryRequest,
221- // / The debug adapter supports the `terminateDebuggee` attribute on the
222- // / `disconnect` request.
223- eAdapterFeatureTerminateDebuggee,
136+ enum AdapterFeature : unsigned {
137+ // / The debug adapter supports ANSI escape sequences in styling of
138+ // / `OutputEvent.output` and `Variable.value` fields.
139+ eAdapterFeatureANSIStyling,
140+ // / The debug adapter supports the `breakpointLocations` request.
141+ eAdapterFeatureBreakpointLocationsRequest,
142+ // / The debug adapter supports the `cancel` request.
143+ eAdapterFeatureCancelRequest,
144+ // / The debug adapter supports the `clipboard` context value in the
145+ // / `evaluate` request.
146+ eAdapterFeatureClipboardContext,
147+ // / The debug adapter supports the `completions` request.
148+ eAdapterFeatureCompletionsRequest,
149+ // / The debug adapter supports conditional breakpoints.
150+ eAdapterFeatureConditionalBreakpoints,
151+ // / The debug adapter supports the `configurationDone` request.
152+ eAdapterFeatureConfigurationDoneRequest,
153+ // / The debug adapter supports the `asAddress` and `bytes` fields in the
154+ // / `dataBreakpointInfo` request.
155+ eAdapterFeatureDataBreakpointBytes,
156+ // / The debug adapter supports data breakpoints.
157+ eAdapterFeatureDataBreakpoints,
158+ // / The debug adapter supports the delayed loading of parts of the stack,
159+ // / which requires that both the `startFrame` and `levels` arguments and the
160+ // / `totalFrames` result of the `stackTrace` request are supported.
161+ eAdapterFeatureDelayedStackTraceLoading,
162+ // / The debug adapter supports the `disassemble` request.
163+ eAdapterFeatureDisassembleRequest,
164+ // / The debug adapter supports a (side effect free) `evaluate` request for
165+ // / data hovers.
166+ eAdapterFeatureEvaluateForHovers,
167+ // / The debug adapter supports `filterOptions` as an argument on the
168+ // / `setExceptionBreakpoints` request.
169+ eAdapterFeatureExceptionFilterOptions,
170+ // / The debug adapter supports the `exceptionInfo` request.
171+ eAdapterFeatureExceptionInfoRequest,
172+ // / The debug adapter supports `exceptionOptions` on the
173+ // / `setExceptionBreakpoints` request.
174+ eAdapterFeatureExceptionOptions,
175+ // / The debug adapter supports function breakpoints.
176+ eAdapterFeatureFunctionBreakpoints,
177+ // / The debug adapter supports the `gotoTargets` request.
178+ eAdapterFeatureGotoTargetsRequest,
179+ // / The debug adapter supports breakpoints that break execution after a
180+ // / specified number of hits.
181+ eAdapterFeatureHitConditionalBreakpoints,
182+ // / The debug adapter supports adding breakpoints based on instruction
183+ // / references.
184+ eAdapterFeatureInstructionBreakpoints,
185+ // / The debug adapter supports the `loadedSources` request.
186+ eAdapterFeatureLoadedSourcesRequest,
187+ // / The debug adapter supports log points by interpreting the `logMessage`
188+ // / attribute of the `SourceBreakpoint`.
189+ eAdapterFeatureLogPoints,
190+ // / The debug adapter supports the `modules` request.
191+ eAdapterFeatureModulesRequest,
192+ // / The debug adapter supports the `readMemory` request.
193+ eAdapterFeatureReadMemoryRequest,
194+ // / The debug adapter supports restarting a frame.
195+ eAdapterFeatureRestartFrame,
196+ // / The debug adapter supports the `restart` request. In this case a client
197+ // / should not implement `restart` by terminating and relaunching the
198+ // / adapter but by calling the `restart` request.
199+ eAdapterFeatureRestartRequest,
200+ // / The debug adapter supports the `setExpression` request.
201+ eAdapterFeatureSetExpression,
202+ // / The debug adapter supports setting a variable to a value.
203+ eAdapterFeatureSetVariable,
204+ // / The debug adapter supports the `singleThread` property on the execution
205+ // / requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`,
206+ // / `stepBack`).
207+ eAdapterFeatureSingleThreadExecutionRequests,
208+ // / The debug adapter supports stepping back via the `stepBack` and
209+ // / `reverseContinue` requests.
210+ eAdapterFeatureStepBack,
211+ // / The debug adapter supports the `stepInTargets` request.
212+ eAdapterFeatureStepInTargetsRequest,
213+ // / The debug adapter supports stepping granularities (argument
214+ // / `granularity`) for the stepping requests.
215+ eAdapterFeatureSteppingGranularity,
216+ // / The debug adapter supports the `terminate` request.
217+ eAdapterFeatureTerminateRequest,
218+ // / The debug adapter supports the `terminateThreads` request.
219+ eAdapterFeatureTerminateThreadsRequest,
220+ // / The debug adapter supports the `suspendDebuggee` attribute on the
221+ // / `disconnect` request.
222+ eAdapterFeatureSuspendDebuggee,
223+ // / The debug adapter supports a `format` attribute on the `stackTrace`,
224+ // / `variables`, and `evaluate` requests.
225+ eAdapterFeatureValueFormattingOptions,
226+ // / The debug adapter supports the `writeMemory` request.
227+ eAdapterFeatureWriteMemoryRequest,
228+ // / The debug adapter supports the `terminateDebuggee` attribute on the
229+ // / `disconnect` request.
230+ eAdapterFeatureTerminateDebuggee,
224231};
225232
226233// / Information about the capabilities of a debug adapter.
@@ -261,10 +268,10 @@ struct Capabilities {
261268};
262269llvm::json::Value toJSON (const Capabilities &);
263270
264- FLAGS_ENUM ( PresentationHint) {
265- ePresentationHintNormal,
266- ePresentationHintEmphasize,
267- ePresentationHintDeemphasize,
271+ enum PresentationHint : unsigned {
272+ ePresentationHintNormal,
273+ ePresentationHintEmphasize,
274+ ePresentationHintDeemphasize,
268275};
269276
270277// / A `Source` is a descriptor for source code. It is returned from the debug
0 commit comments