LLDB mainline
AcceleratorGDBRemotePackets.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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-exception
6//
7//===----------------------------------------------------------------------===//
8
10
11using namespace lldb_private;
12
13llvm::json::Value lldb_private::toJSON(const AcceleratorActions &data) {
14 return llvm::json::Object{
15 {"plugin_name", data.plugin_name},
16 {"session_name", data.session_name},
17 {"identifier", data.identifier},
18 };
19}
20
21bool lldb_private::fromJSON(const llvm::json::Value &value,
22 AcceleratorActions &data, llvm::json::Path path) {
23 llvm::json::ObjectMapper o(value, path);
24 return o && o.map("plugin_name", data.plugin_name) &&
25 o.map("session_name", data.session_name) &&
26 o.map("identifier", data.identifier);
27}
A class that represents a running process on the host machine.
bool fromJSON(const llvm::json::Value &value, AcceleratorActions &data, llvm::json::Path path)
llvm::json::Value toJSON(const AcceleratorActions &data)
int64_t identifier
Unique identifier for this action within the plugin.
std::string plugin_name
Unique name identifying the accelerator plugin.
std::string session_name
Human-readable label for the accelerator target.