LLDB mainline
AddressableBits.cpp
Go to the documentation of this file.
1//===-- AddressableBits.cpp -----------------------------------------------===//
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#include "lldb/lldb-types.h"
11
12#include <cassert>
13
14using namespace lldb;
15using namespace lldb_private;
16
17void AddressableBits::SetAddressableBits(uint32_t addressing_bits) {
19}
20
21void AddressableBits::SetAddressableBits(uint32_t lowmem_addressing_bits,
22 uint32_t highmem_addressing_bits) {
23 m_low_memory_addr_bits = lowmem_addressing_bits;
24 m_high_memory_addr_bits = highmem_addressing_bits;
25}
26
28 uint32_t lowmem_addressing_bits) {
29 m_low_memory_addr_bits = lowmem_addressing_bits;
30}
31
34}
35
37 uint32_t highmem_addressing_bits) {
38 m_high_memory_addr_bits = highmem_addressing_bits;
39}
40
43}
44
46 assert(addressable_bits <= sizeof(addr_t) * 8);
47 if (addressable_bits == 64)
48 return 0; // all bits used for addressing
49 else
50 return ~((1ULL << addressable_bits) - 1);
51}
void SetHighmemAddressableBits(uint32_t highmem_addressing_bits)
uint32_t GetHighmemAddressableBits() const
void SetAddressableBits(uint32_t addressing_bits)
When a single value is available for the number of bits.
void SetLowmemAddressableBits(uint32_t lowmem_addressing_bits)
static lldb::addr_t AddressableBitToMask(uint32_t addressable_bits)
uint32_t GetLowmemAddressableBits() const
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
Definition: SBAddress.h:15
uint64_t addr_t
Definition: lldb-types.h:79