30 lines · cpp
1//===-- InitializeRequestHandler.cpp --------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#include "CommandPlugins.h"10#include "DAP.h"11#include "EventHelper.h"12#include "JSONUtils.h"13#include "LLDBUtils.h"14#include "Protocol/ProtocolRequests.h"15#include "RequestHandler.h"16#include "lldb/API/SBTarget.h"17 18using namespace lldb_dap;19using namespace lldb_dap::protocol;20 21/// Initialize request; value of command field is 'initialize'.22llvm::Expected<InitializeResponse> InitializeRequestHandler::Run(23 const InitializeRequestArguments &arguments) const {24 // Store initialization arguments for later use in Launch/Attach.25 dap.clientFeatures = arguments.supportedFeatures;26 dap.sourceInitFile = arguments.lldbExtSourceInitFile.value_or(true);27 28 return dap.GetCapabilities();29}30