This adds a new 'CapabilitiesEventBody' type for having a well structured type for the event and updates the 'restart' request to dynamically set their capabilities.
21 lines
645 B
C++
21 lines
645 B
C++
//===-- ProtocolEvents.cpp ------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "Protocol/ProtocolEvents.h"
|
|
#include "llvm/Support/JSON.h"
|
|
|
|
using namespace llvm;
|
|
|
|
namespace lldb_dap::protocol {
|
|
|
|
json::Value toJSON(const CapabilitiesEventBody &CEB) {
|
|
return json::Object{{"capabilities", CEB.capabilities}};
|
|
}
|
|
|
|
} // namespace lldb_dap::protocol
|