mirror of
https://github.com/siemens-mobile-hacks/llvm-c166.git
synced 2026-11-25 21:45:57 +00:00
This is part of larger effort to support address spaces in lldb https://discourse.llvm.org/t/rfc-address-spaces-support-in-lldb/91222/ This PR introduces the definition of AddressSpace and ProcessAddress classes, which are foundational for next PRs Stack: 1. #206370 (this PR) - the classes 2. #214088 ProcessAddress adoption (NFC) 3. #214089 Generic address space support
28 lines
1,006 B
C++
28 lines
1,006 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// 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 "lldb/Utility/AddressSpace.h"
|
|
|
|
using namespace llvm;
|
|
using namespace llvm::json;
|
|
|
|
namespace lldb_private {
|
|
|
|
bool fromJSON(const json::Value &value, AddressSpaceInfo &data, Path path) {
|
|
ObjectMapper o(value, path);
|
|
return o && o.map("name", data.name) && o.map("space_id", data.space_id) &&
|
|
o.map("is_thread_specific", data.is_thread_specific);
|
|
}
|
|
|
|
json::Value toJSON(const AddressSpaceInfo &data) {
|
|
return json::Value(Object{{"name", data.name},
|
|
{"space_id", data.space_id},
|
|
{"is_thread_specific", data.is_thread_specific}});
|
|
}
|
|
|
|
} // namespace lldb_private
|