@@ -301,4 +301,88 @@ bool fromJSON(const llvm::json::Value &Params, StepOutArguments &SOA,
301301 OM.mapOptional (" granularity" , SOA.granularity );
302302}
303303
304+ bool fromJSON (const llvm::json::Value &Params, SetBreakpointsArguments &SBA,
305+ llvm::json::Path P) {
306+ json::ObjectMapper O (Params, P);
307+ return O && O.map (" source" , SBA.source ) &&
308+ O.map (" breakpoints" , SBA.breakpoints ) && O.map (" lines" , SBA.lines ) &&
309+ O.map (" sourceModified" , SBA.sourceModified );
310+ }
311+
312+ llvm::json::Value toJSON (const SetBreakpointsResponseBody &SBR) {
313+ json::Object result;
314+ result[" breakpoints" ] = SBR.breakpoints ;
315+ return result;
316+ }
317+
318+ bool fromJSON (const llvm::json::Value &Params,
319+ SetFunctionBreakpointsArguments &SFBA, llvm::json::Path P) {
320+ json::ObjectMapper O (Params, P);
321+ return O && O.map (" breakpoints" , SFBA.breakpoints );
322+ }
323+
324+ llvm::json::Value toJSON (const SetFunctionBreakpointsResponseBody &SFBR) {
325+ json::Object result;
326+ result[" breakpoints" ] = SFBR.breakpoints ;
327+ return result;
328+ }
329+
330+ bool fromJSON (const llvm::json::Value &Params,
331+ SetExceptionBreakpointsArguments &SEBA, llvm::json::Path P) {
332+ json::ObjectMapper O (Params, P);
333+ return O && O.map (" filters" , SEBA.filters ) &&
334+ O.map (" filterOptions" , SEBA.filterOptions ) &&
335+ O.map (" exceptionOptions" , SEBA.exceptionOptions );
336+ }
337+
338+ llvm::json::Value toJSON (const SetExceptionBreakpointsResponseBody &SEBR) {
339+ json::Object result;
340+ result[" breakpoints" ] = SEBR.breakpoints ;
341+ return result;
342+ }
343+
344+ bool fromJSON (const llvm::json::Value &Params,
345+ SetInstructionBreakpointsArguments &SIBA, llvm::json::Path P) {
346+ json::ObjectMapper O (Params, P);
347+ return O && O.map (" breakpoints" , SIBA.breakpoints );
348+ }
349+
350+ llvm::json::Value toJSON (const SetInstructionBreakpointsResponseBody &SIBR) {
351+ json::Object result;
352+ result[" breakpoints" ] = SIBR.breakpoints ;
353+ return result;
354+ }
355+
356+ bool fromJSON (const llvm::json::Value &Params,
357+ DataBreakpointInfoArguments &DBIA, llvm::json::Path P) {
358+ json::ObjectMapper O (Params, P);
359+ return O && O.map (" variablesReference" , DBIA.variablesReference ) &&
360+ O.map (" name" , DBIA.name ) && O.map (" frameId" , DBIA.frameId ) &&
361+ O.map (" bytes" , DBIA.bytes ) && O.map (" asAddress" , DBIA.asAddress ) &&
362+ O.map (" mode" , DBIA.mode );
363+ }
364+
365+ llvm::json::Value toJSON (const DataBreakpointInfoResponseBody &DBIRB) {
366+ json::Object result;
367+ result[" dataId" ] = DBIRB.dataId ? *DBIRB.dataId : llvm::json::Value (nullptr );
368+ result[" description" ] = DBIRB.description ;
369+ if (DBIRB.accessTypes )
370+ result[" accessTypes" ] = *DBIRB.accessTypes ;
371+ if (DBIRB.canPersist )
372+ result[" canPersist" ] = *DBIRB.canPersist ;
373+ return result;
374+ }
375+
376+ bool fromJSON (const llvm::json::Value &Params,
377+ SetDataBreakpointsArguments &SDBA, llvm::json::Path P) {
378+ json::ObjectMapper O (Params, P);
379+ return O && O.map (" breakpoints" , SDBA.breakpoints );
380+ }
381+
382+ llvm::json::Value toJSON (const SetDataBreakpointsResponseBody &SDBR) {
383+ json::Object result;
384+ result[" breakpoints" ] = SDBR.breakpoints ;
385+ return result;
386+ }
387+
304388} // namespace lldb_dap::protocol
0 commit comments