[Lldb-commits] [lldb] [lldb] Add AddressSpaceInfo and ProcessAddress utility classes (PR #206370)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 6 22:13:07 PDT 2026
================
@@ -0,0 +1,51 @@
+//===-- ProcessAddress.h --------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_UTILITY_PROCESSADDRESS_H
+#define LLDB_UTILITY_PROCESSADDRESS_H
+
+#include "lldb/lldb-defines.h"
+#include "lldb/lldb-types.h"
+#include <optional>
+
+namespace lldb_private {
+
+/// An address in a process, qualified by an address space.
+///
+/// The address space is a numeric id reported by the process (see
+/// Process::GetAddressSpaces). LLDB_DEFAULT_ADDRESS_SPACE_ID is the default
+/// (flat) address space, so a ProcessAddress with no space behaves like a plain
+/// lldb::addr_t.
+class ProcessAddress {
+ lldb::addr_t m_value;
+ uint64_t m_addr_space = LLDB_DEFAULT_ADDRESS_SPACE_ID;
----------------
JDevlieghere wrote:
Let's create a `lldb::addr_space_t` typedef in lldb-types.h
https://github.com/llvm/llvm-project/pull/206370
More information about the lldb-commits
mailing list