LLDB mainline
AddressSpace.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 llvm;
12using namespace llvm::json;
13
14namespace lldb_private {
15
16bool fromJSON(const json::Value &value, AddressSpaceInfo &data, Path path) {
17 ObjectMapper o(value, path);
18 return o && o.map("name", data.name) && o.map("space_id", data.space_id) &&
19 o.map("is_thread_specific", data.is_thread_specific);
20}
21
22json::Value toJSON(const AddressSpaceInfo &data) {
23 return json::Value(Object{{"name", data.name},
24 {"space_id", data.space_id},
25 {"is_thread_specific", data.is_thread_specific}});
26}
27
28} // namespace lldb_private
A class that represents a running process on the host machine.
llvm::json::Value toJSON(const Diagnostics::Report &report)
Render a diagnostics report as JSON, for diagnostics dump's terminal output.
bool fromJSON(const llvm::json::Value &value, SymbolValue &data, llvm::json::Path path)
A single address space reported by a process.
lldb::addr_space_t space_id