llvm-c166/lldb/source/Utility/AddressSpace.cpp
satyanarayana reddy janga adeee16fa3
[lldb] Add AddressSpaceInfo and ProcessAddress utility classes (#206370)
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
2026-08-07 17:53:45 -06:00

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