LLDB mainline
RegisterContextKDP_arm64.cpp
Go to the documentation of this file.
1//===-- RegisterContextKDP_arm64.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 "ProcessKDP.h"
12#include "ThreadKDP.h"
13
14using namespace lldb;
15using namespace lldb_private;
16
18 uint32_t concrete_frame_idx)
19 : RegisterContextDarwin_arm64(thread, concrete_frame_idx),
20 m_kdp_thread(thread) {}
21
23
25 ProcessSP process_sp(CalculateProcess());
26 if (process_sp) {
28 if (static_cast<ProcessKDP *>(process_sp.get())
31 error)) {
32 if (error.Success())
33 return 0;
34 }
35 }
36 return -1;
37}
38
40 ProcessSP process_sp(CalculateProcess());
41 if (process_sp) {
43 if (static_cast<ProcessKDP *>(process_sp.get())
46 error)) {
47 if (error.Success())
48 return 0;
49 }
50 }
51 return -1;
52}
53
55 ProcessSP process_sp(CalculateProcess());
56 if (process_sp) {
58 if (static_cast<ProcessKDP *>(process_sp.get())
61 error)) {
62 if (error.Success())
63 return 0;
64 }
65 }
66 return -1;
67}
68
70 ProcessSP process_sp(CalculateProcess());
71 if (process_sp) {
73 if (static_cast<ProcessKDP *>(process_sp.get())
76 error)) {
77 if (error.Success())
78 return 0;
79 }
80 }
81 return -1;
82}
83
85 const GPR &gpr) {
86 ProcessSP process_sp(CalculateProcess());
87 if (process_sp) {
89 if (static_cast<ProcessKDP *>(process_sp.get())
92 error)) {
93 if (error.Success())
94 return 0;
95 }
96 }
97 return -1;
98}
99
101 const FPU &fpu) {
102 ProcessSP process_sp(CalculateProcess());
103 if (process_sp) {
105 if (static_cast<ProcessKDP *>(process_sp.get())
108 error)) {
109 if (error.Success())
110 return 0;
111 }
112 }
113 return -1;
114}
115
117 const EXC &exc) {
118 ProcessSP process_sp(CalculateProcess());
119 if (process_sp) {
121 if (static_cast<ProcessKDP *>(process_sp.get())
124 error)) {
125 if (error.Success())
126 return 0;
127 }
128 }
129 return -1;
130}
131
133 const DBG &dbg) {
134 ProcessSP process_sp(CalculateProcess());
135 if (process_sp) {
137 if (static_cast<ProcessKDP *>(process_sp.get())
140 error)) {
141 if (error.Success())
142 return 0;
143 }
144 }
145 return -1;
146}
static llvm::raw_ostream & error(Stream &strm)
uint32_t SendRequestReadRegisters(uint32_t cpu, uint32_t flavor, void *dst, uint32_t dst_size, lldb_private::Status &error)
uint32_t SendRequestWriteRegisters(uint32_t cpu, uint32_t flavor, const void *src, uint32_t src_size, lldb_private::Status &error)
CommunicationKDP & GetCommunication()
Definition: ProcessKDP.h:127
int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override
int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override
int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override
int DoWriteDBG(lldb::tid_t tid, int flavor, const DBG &dbg) override
int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override
int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override
~RegisterContextKDP_arm64() override
RegisterContextKDP_arm64(ThreadKDP &thread, uint32_t concrete_frame_idx)
int DoReadDBG(lldb::tid_t tid, int flavor, DBG &dbg) override
int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override
lldb::ProcessSP CalculateProcess() override
An error handling class.
Definition: Status.h:115
A class that represents a running process on the host machine.
Definition: SBAddress.h:15
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:389
uint64_t tid_t
Definition: lldb-types.h:84