LLDB mainline
RegisterContextPOSIXCore_arm.cpp
Go to the documentation of this file.
1//===-- RegisterContextPOSIXCore_arm.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
11#include "lldb/Target/Thread.h"
13
14#include <memory>
15
16using namespace lldb_private;
17
19 Thread &thread, std::unique_ptr<RegisterInfoPOSIX_arm> register_info,
20 const DataExtractor &gpregset, llvm::ArrayRef<CoreNote> notes)
21 : RegisterContextPOSIX_arm(thread, std::move(register_info)) {
22 m_gpr_buffer = std::make_shared<DataBufferHeap>(gpregset.GetDataStart(),
23 gpregset.GetByteSize());
26}
27
29
31
33
35 assert(0);
36 return false;
37}
38
40 assert(0);
41 return false;
42}
43
45 RegisterValue &value) {
46 lldb::offset_t offset = reg_info->byte_offset;
47 if (offset + reg_info->byte_size <= GetGPRSize()) {
48 uint64_t v = m_gpr.GetMaxU64(&offset, reg_info->byte_size);
49 if (offset == reg_info->byte_offset + reg_info->byte_size) {
50 value = v;
51 return true;
52 }
53 }
54 return false;
55}
56
59 return false;
60}
61
63 const RegisterValue &value) {
64 return false;
65}
66
68 const lldb::DataBufferSP &data_sp) {
69 return false;
70}
71
73 return false;
74}
RegisterContextCorePOSIX_arm(lldb_private::Thread &thread, std::unique_ptr< RegisterInfoPOSIX_arm > register_info, const lldb_private::DataExtractor &gpregset, llvm::ArrayRef< lldb_private::CoreNote > notes)
bool HardwareSingleStep(bool enable) override
bool WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value) override
bool ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override
bool ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value) override
~RegisterContextCorePOSIX_arm() override
bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override
An data extractor class.
Definition: DataExtractor.h:48
void SetByteOrder(lldb::ByteOrder byte_order)
Set the byte_order value.
uint64_t GetByteSize() const
Get the number of bytes contained in this object.
const uint8_t * GetDataStart() const
Get the data start pointer.
lldb::offset_t SetData(const void *bytes, lldb::offset_t length, lldb::ByteOrder byte_order)
Set data with a buffer that is caller owned.
uint64_t GetMaxU64(lldb::offset_t *offset_ptr, size_t byte_size) const
Extract an unsigned integer of size byte_size from *offset_ptr.
lldb::ByteOrder GetByteOrder() const
Get the current byte order value.
A class that represents a running process on the host machine.
uint64_t offset_t
Definition: lldb-types.h:85
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
Definition: lldb-forward.h:334
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
Definition: lldb-forward.h:335
Every register is described in detail including its name, alternate name (optional),...
uint32_t byte_offset
The byte offset in the register context data where this register's value is found.
uint32_t byte_size
Size in bytes of the register.