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/Target/Process.h"
11#include "lldb/lldb-types.h"
12
13using namespace lldb;
14using namespace lldb_private;
15
16void AddressableBits::SetAddressableBits(uint32_t addressing_bits) {
18}
19
20void AddressableBits::SetAddressableBits(uint32_t lowmem_addressing_bits,
21 uint32_t highmem_addressing_bits) {
22 m_low_memory_addr_bits = lowmem_addressing_bits;
23 m_high_memory_addr_bits = highmem_addressing_bits;
24}
25
27 uint32_t lowmem_addressing_bits) {
28 m_low_memory_addr_bits = lowmem_addressing_bits;
29}
30
32 uint32_t highmem_addressing_bits) {
33 m_high_memory_addr_bits = highmem_addressing_bits;
34}
35
38 return;
39
40 if (m_low_memory_addr_bits != 0) {
41 addr_t low_addr_mask = ~((1ULL << m_low_memory_addr_bits) - 1);
42 process.SetCodeAddressMask(low_addr_mask);
43 process.SetDataAddressMask(low_addr_mask);
44 }
45
46 if (m_high_memory_addr_bits != 0) {
47 addr_t hi_addr_mask = ~((1ULL << m_high_memory_addr_bits) - 1);
48 process.SetHighmemCodeAddressMask(hi_addr_mask);
49 process.SetHighmemDataAddressMask(hi_addr_mask);
50 }
51}
void SetHighmemAddressableBits(uint32_t highmem_addressing_bits)
void SetAddressableBits(uint32_t addressing_bits)
When a single value is available for the number of bits.
void SetProcessMasks(lldb_private::Process &process)
void SetLowmemAddressableBits(uint32_t lowmem_addressing_bits)
A plug-in interface definition class for debugging a process.
Definition: Process.h:339
void SetHighmemDataAddressMask(lldb::addr_t data_address_mask)
Definition: Process.cpp:5725
void SetHighmemCodeAddressMask(lldb::addr_t code_address_mask)
Definition: Process.cpp:5718
void SetCodeAddressMask(lldb::addr_t code_address_mask)
Definition: Process.cpp:5706
void SetDataAddressMask(lldb::addr_t data_address_mask)
Definition: Process.cpp:5712
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