LLDB  mainline
NativeRegisterContext.cpp
Go to the documentation of this file.
1 //===-- NativeRegisterContext.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/Utility/Log.h"
13 
14 #include "lldb/Host/PosixApi.h"
17 
18 using namespace lldb;
19 using namespace lldb_private;
20 
21 NativeRegisterContext::NativeRegisterContext(NativeThreadProtocol &thread)
22  : m_thread(thread) {}
23 
24 // Destructor
26 
27 // FIXME revisit invalidation, process stop ids, etc. Right now we don't
28 // support caching in NativeRegisterContext. We can do this later by utilizing
29 // NativeProcessProtocol::GetStopID () and adding a stop id to
30 // NativeRegisterContext.
31 
32 // void
33 // NativeRegisterContext::InvalidateIfNeeded (bool force) {
34 // ProcessSP process_sp (m_thread.GetProcess());
35 // bool invalidate = force;
36 // uint32_t process_stop_id = UINT32_MAX;
37 
38 // if (process_sp)
39 // process_stop_id = process_sp->GetStopID();
40 // else
41 // invalidate = true;
42 
43 // if (!invalidate)
44 // invalidate = process_stop_id != GetStopID();
45 
46 // if (invalidate)
47 // {
48 // InvalidateAllRegisters ();
49 // SetStopID (process_stop_id);
50 // }
51 // }
52 
53 const RegisterInfo *
55  uint32_t start_idx) {
56  if (reg_name.empty())
57  return nullptr;
58 
59  // Generic register names take precedence over specific register names.
60  // For example, on x86 we want "sp" to refer to the complete RSP/ESP register
61  // rather than the 16-bit SP pseudo-register.
62  uint32_t generic_reg = Args::StringToGenericRegister(reg_name);
63  if (generic_reg != LLDB_INVALID_REGNUM) {
64  const RegisterInfo *reg_info =
66  if (reg_info)
67  return reg_info;
68  }
69 
70  const uint32_t num_registers = GetRegisterCount();
71  for (uint32_t reg = start_idx; reg < num_registers; ++reg) {
72  const RegisterInfo *reg_info = GetRegisterInfoAtIndex(reg);
73 
74  if (reg_name.equals_insensitive(reg_info->name) ||
75  reg_name.equals_insensitive(reg_info->alt_name))
76  return reg_info;
77  }
78 
79  return nullptr;
80 }
81 
83  uint32_t num) {
84  const uint32_t reg_num = ConvertRegisterKindToRegisterNumber(kind, num);
85  if (reg_num == LLDB_INVALID_REGNUM)
86  return nullptr;
87  return GetRegisterInfoAtIndex(reg_num);
88 }
89 
91  const RegisterInfo *reg_info = GetRegisterInfoAtIndex(reg);
92  if (reg_info)
93  return reg_info->name;
94  return nullptr;
95 }
96 
98  uint32_t reg_index) const {
99  const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(reg_index);
100  if (!reg_info)
101  return nullptr;
102 
103  for (uint32_t set_index = 0; set_index < GetRegisterSetCount(); ++set_index) {
104  const RegisterSet *const reg_set = GetRegisterSet(set_index);
105  if (!reg_set)
106  continue;
107 
108  for (uint32_t reg_num_index = 0; reg_num_index < reg_set->num_registers;
109  ++reg_num_index) {
110  const uint32_t reg_num = reg_set->registers[reg_num_index];
111  // FIXME double check we're checking the right register kind here.
112  if (reg_info->kinds[RegisterKind::eRegisterKindLLDB] == reg_num) {
113  // The given register is a member of this register set. Return the
114  // register set name.
115  return reg_set->name;
116  }
117  }
118  }
119 
120  // Didn't find it.
121  return nullptr;
122 }
123 
126 
129  LLDB_LOGF(log,
130  "NativeRegisterContext::%s using reg index %" PRIu32
131  " (default %" PRIu64 ")",
132  __FUNCTION__, reg, fail_value);
133 
134  const uint64_t retval = ReadRegisterAsUnsigned(reg, fail_value);
135 
136  LLDB_LOGF(log, "NativeRegisterContext::%s " PRIu32 " retval %" PRIu64,
137  __FUNCTION__, retval);
138 
139  return retval;
140 }
141 
144  return GetPC(fail_value);
145 }
146 
150  return WriteRegisterFromUnsigned(reg, pc);
151 }
152 
156  return ReadRegisterAsUnsigned(reg, fail_value);
157 }
158 
162  return WriteRegisterFromUnsigned(reg, sp);
163 }
164 
168  return ReadRegisterAsUnsigned(reg, fail_value);
169 }
170 
174  return WriteRegisterFromUnsigned(reg, fp);
175 }
176 
180  return ReadRegisterAsUnsigned(reg, fail_value);
181 }
182 
186  return ReadRegisterAsUnsigned(reg, fail_value);
187 }
188 
191  lldb::addr_t fail_value) {
192  if (reg != LLDB_INVALID_REGNUM)
193  return ReadRegisterAsUnsigned(GetRegisterInfoAtIndex(reg), fail_value);
194  return fail_value;
195 }
196 
197 uint64_t
199  lldb::addr_t fail_value) {
201 
202  if (reg_info) {
203  RegisterValue value;
204  Status error = ReadRegister(reg_info, value);
205  if (error.Success()) {
206  LLDB_LOGF(log,
207  "NativeRegisterContext::%s ReadRegister() succeeded, value "
208  "%" PRIu64,
209  __FUNCTION__, value.GetAsUInt64());
210  return value.GetAsUInt64();
211  } else {
212  LLDB_LOGF(log,
213  "NativeRegisterContext::%s ReadRegister() failed, error %s",
214  __FUNCTION__, error.AsCString());
215  }
216  } else {
217  LLDB_LOGF(log, "NativeRegisterContext::%s ReadRegister() null reg_info",
218  __FUNCTION__);
219  }
220  return fail_value;
221 }
222 
224  uint64_t uval) {
225  if (reg == LLDB_INVALID_REGNUM)
226  return Status("NativeRegisterContext::%s (): reg is invalid", __FUNCTION__);
228 }
229 
230 Status
232  uint64_t uval) {
233  assert(reg_info);
234  if (!reg_info)
235  return Status("reg_info is nullptr");
236 
237  RegisterValue value;
238  if (!value.SetUInt(uval, reg_info->byte_size))
239  return Status("RegisterValue::SetUInt () failed");
240 
241  return WriteRegister(reg_info, value);
242 }
243 
245  return m_thread.GetID();
246 }
247 
249 
251  size_t size) {
252  return LLDB_INVALID_INDEX32;
253 }
254 
256  return Status("not implemented");
257 }
258 
260  return false;
261 }
262 
264  lldb::addr_t trap_addr) {
265  bp_index = LLDB_INVALID_INDEX32;
266  return Status("not implemented");
267 }
268 
270 
272  size_t size,
273  uint32_t watch_flags) {
274  return LLDB_INVALID_INDEX32;
275 }
276 
278  return false;
279 }
280 
282  return Status("not implemented");
283 }
284 
286  return Status("not implemented");
287 }
288 
290  is_hit = false;
291  return Status("not implemented");
292 }
293 
295  lldb::addr_t trap_addr) {
296  wp_index = LLDB_INVALID_INDEX32;
297  return Status("not implemented");
298 }
299 
301  bool &is_vacant) {
302  is_vacant = false;
303  return Status("not implemented");
304 }
305 
307  return LLDB_INVALID_ADDRESS;
308 }
309 
311  return LLDB_INVALID_ADDRESS;
312 }
313 
314 bool NativeRegisterContext::HardwareSingleStep(bool enable) { return false; }
315 
317  const RegisterInfo *reg_info, lldb::addr_t src_addr, size_t src_len,
318  RegisterValue &reg_value) {
319  Status error;
320  if (reg_info == nullptr) {
321  error.SetErrorString("invalid register info argument.");
322  return error;
323  }
324 
325  // Moving from addr into a register
326  //
327  // Case 1: src_len == dst_len
328  //
329  // |AABBCCDD| Address contents
330  // |AABBCCDD| Register contents
331  //
332  // Case 2: src_len > dst_len
333  //
334  // Status! (The register should always be big enough to hold the data)
335  //
336  // Case 3: src_len < dst_len
337  //
338  // |AABB| Address contents
339  // |AABB0000| Register contents [on little-endian hardware]
340  // |0000AABB| Register contents [on big-endian hardware]
341  if (src_len > RegisterValue::kMaxRegisterByteSize) {
342  error.SetErrorString("register too small to receive memory data");
343  return error;
344  }
345 
346  const size_t dst_len = reg_info->byte_size;
347 
348  if (src_len > dst_len) {
349  error.SetErrorStringWithFormat(
350  "%" PRIu64 " bytes is too big to store in register %s (%" PRIu64
351  " bytes)",
352  static_cast<uint64_t>(src_len), reg_info->name,
353  static_cast<uint64_t>(dst_len));
354  return error;
355  }
356 
359 
360  // Read the memory
361  size_t bytes_read;
362  error = process.ReadMemory(src_addr, src, src_len, bytes_read);
363  if (error.Fail())
364  return error;
365 
366  // Make sure the memory read succeeded...
367  if (bytes_read != src_len) {
368  // This might happen if we read _some_ bytes but not all
369  error.SetErrorStringWithFormat("read %" PRIu64 " of %" PRIu64 " bytes",
370  static_cast<uint64_t>(bytes_read),
371  static_cast<uint64_t>(src_len));
372  return error;
373  }
374 
375  // We now have a memory buffer that contains the part or all of the register
376  // value. Set the register value using this memory data.
377  // TODO: we might need to add a parameter to this function in case the byte
378  // order of the memory data doesn't match the process. For now we are
379  // assuming they are the same.
380  reg_value.SetFromMemoryData(reg_info, src, src_len, process.GetByteOrder(),
381  error);
382 
383  return error;
384 }
385 
387  const RegisterInfo *reg_info, lldb::addr_t dst_addr, size_t dst_len,
388  const RegisterValue &reg_value) {
389 
391 
392  Status error;
393 
395 
396  // TODO: we might need to add a parameter to this function in case the byte
397  // order of the memory data doesn't match the process. For now we are
398  // assuming they are the same.
399  const size_t bytes_copied = reg_value.GetAsMemoryData(
400  reg_info, dst, dst_len, process.GetByteOrder(), error);
401 
402  if (error.Success()) {
403  if (bytes_copied == 0) {
404  error.SetErrorString("byte copy failed.");
405  } else {
406  size_t bytes_written;
407  error = process.WriteMemory(dst_addr, dst, bytes_copied, bytes_written);
408  if (error.Fail())
409  return error;
410 
411  if (bytes_written != bytes_copied) {
412  // This might happen if we read _some_ bytes but not all
413  error.SetErrorStringWithFormat("only wrote %" PRIu64 " of %" PRIu64
414  " bytes",
415  static_cast<uint64_t>(bytes_written),
416  static_cast<uint64_t>(bytes_copied));
417  }
418  }
419  }
420 
421  return error;
422 }
423 
424 uint32_t
426  uint32_t num) const {
427  const uint32_t num_regs = GetRegisterCount();
428 
429  assert(kind < kNumRegisterKinds);
430  for (uint32_t reg_idx = 0; reg_idx < num_regs; ++reg_idx) {
431  const RegisterInfo *reg_info = GetRegisterInfoAtIndex(reg_idx);
432 
433  if (reg_info->kinds[kind] == num)
434  return reg_idx;
435  }
436 
437  return LLDB_INVALID_REGNUM;
438 }
439 
440 std::vector<uint32_t>
442  if (expType == ExpeditedRegs::Minimal) {
443  // Expedite only a minimum set of important generic registers.
444  static const uint32_t k_expedited_registers[] = {
447 
448  std::vector<uint32_t> expedited_reg_nums;
449  for (uint32_t gen_reg : k_expedited_registers) {
450  uint32_t reg_num =
452  if (reg_num == LLDB_INVALID_REGNUM)
453  continue; // Target does not support the given register.
454  else
455  expedited_reg_nums.push_back(reg_num);
456  }
457 
458  return expedited_reg_nums;
459  }
460 
461  if (GetRegisterSetCount() > 0 && expType == ExpeditedRegs::Full)
462  return std::vector<uint32_t>(GetRegisterSet(0)->registers,
463  GetRegisterSet(0)->registers +
464  GetRegisterSet(0)->num_registers);
465 
466  return std::vector<uint32_t>();
467 }
lldb_private::NativeRegisterContext::GetRegisterCount
virtual uint32_t GetRegisterCount() const =0
lldb_private::NativeRegisterContext::ClearHardwareWatchpoint
virtual bool ClearHardwareWatchpoint(uint32_t hw_index)
Definition: NativeRegisterContext.cpp:277
lldb_private::NativeRegisterContext::HardwareSingleStep
virtual bool HardwareSingleStep(bool enable)
Definition: NativeRegisterContext.cpp:314
lldb_private::NativeRegisterContext::GetWatchpointHitIndex
virtual Status GetWatchpointHitIndex(uint32_t &wp_index, lldb::addr_t trap_addr)
Definition: NativeRegisterContext.cpp:294
LLDB_INVALID_REGNUM
#define LLDB_INVALID_REGNUM
Definition: lldb-defines.h:91
lldb_private::NativeRegisterContext::ReadRegister
virtual Status ReadRegister(const RegisterInfo *reg_info, RegisterValue &reg_value)=0
lldb_private::RegisterValue
Definition: RegisterValue.h:28
lldb_private::NativeThreadProtocol
Definition: NativeThreadProtocol.h:20
lldb_private::NativeRegisterContext::WriteRegisterFromUnsigned
Status WriteRegisterFromUnsigned(uint32_t reg, uint64_t uval)
Definition: NativeRegisterContext.cpp:223
lldb_private::NativeRegisterContext::IsWatchpointVacant
virtual Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant)
Definition: NativeRegisterContext.cpp:300
lldb_private::NativeRegisterContext::SetHardwareBreakpoint
virtual uint32_t SetHardwareBreakpoint(lldb::addr_t addr, size_t size)
Definition: NativeRegisterContext.cpp:250
lldb::eRegisterKindGeneric
@ eRegisterKindGeneric
insn ptr reg, stack ptr reg, etc not specific to any particular target
Definition: lldb-enumerations.h:230
lldb_private::NativeRegisterContext::GetRegisterInfoByName
const RegisterInfo * GetRegisterInfoByName(llvm::StringRef reg_name, uint32_t start_idx=0)
Definition: NativeRegisterContext.cpp:54
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:249
lldb_private::ExpeditedRegs::Minimal
@ Minimal
lldb_private::NativeThreadProtocol::GetProcess
NativeProcessProtocol & GetProcess()
Definition: NativeThreadProtocol.h:37
lldb_private::Args::StringToGenericRegister
static uint32_t StringToGenericRegister(llvm::StringRef s)
Definition: Args.cpp:425
lldb_private::NativeRegisterContext::ClearAllHardwareBreakpoints
virtual Status ClearAllHardwareBreakpoints()
Definition: NativeRegisterContext.cpp:255
lldb::kNumRegisterKinds
@ kNumRegisterKinds
Definition: lldb-enumerations.h:235
RegisterValue.h
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
pc
@ pc
Definition: CompactUnwindInfo.cpp:1250
lldb_private::NativeRegisterContext::ClearWatchpointHit
virtual Status ClearWatchpointHit(uint32_t hw_index)
Definition: NativeRegisterContext.cpp:281
lldb_private::NativeRegisterContext::SetPC
Status SetPC(lldb::addr_t pc)
Definition: NativeRegisterContext.cpp:147
lldb_private::NativeRegisterContext::GetRegisterName
const char * GetRegisterName(uint32_t reg)
Definition: NativeRegisterContext.cpp:90
lldb_private::RegisterValue::GetAsUInt64
uint64_t GetAsUInt64(uint64_t fail_value=UINT64_MAX, bool *success_ptr=nullptr) const
Definition: RegisterValue.cpp:563
lldb_private::NativeRegisterContext::ReadRegisterAsUnsigned
lldb::addr_t ReadRegisterAsUnsigned(uint32_t reg, lldb::addr_t fail_value)
Definition: NativeRegisterContext.cpp:190
lldb_private::NativeRegisterContext::GetRegisterInfo
const RegisterInfo * GetRegisterInfo(uint32_t reg_kind, uint32_t reg_num)
Definition: NativeRegisterContext.cpp:82
LLDB_REGNUM_GENERIC_FLAGS
#define LLDB_REGNUM_GENERIC_FLAGS
Definition: lldb-defines.h:67
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::NativeRegisterContext::ConvertRegisterKindToRegisterNumber
uint32_t ConvertRegisterKindToRegisterNumber(uint32_t kind, uint32_t num) const
Definition: NativeRegisterContext.cpp:425
lldb::eRegisterKindLLDB
@ eRegisterKindLLDB
lldb's internal register numbers
Definition: lldb-enumerations.h:234
lldb_private::NativeRegisterContext::GetWatchpointHitAddress
virtual lldb::addr_t GetWatchpointHitAddress(uint32_t wp_index)
Definition: NativeRegisterContext.cpp:310
Log.h
lldb_private::NativeProcessProtocol::WriteMemory
virtual Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size, size_t &bytes_written)=0
lldb_private::NativeRegisterContext::GetSP
lldb::addr_t GetSP(lldb::addr_t fail_value=LLDB_INVALID_ADDRESS)
Definition: NativeRegisterContext.cpp:153
lldb_private::NativeRegisterContext::GetRegisterInfoAtIndex
virtual const RegisterInfo * GetRegisterInfoAtIndex(uint32_t reg) const =0
lldb_private::NativeRegisterContext::SetFP
Status SetFP(lldb::addr_t fp)
Definition: NativeRegisterContext.cpp:171
lldb_private::NativeRegisterContext::GetRegisterSetNameForRegisterAtIndex
const char * GetRegisterSetNameForRegisterAtIndex(uint32_t reg_index) const
Definition: NativeRegisterContext.cpp:97
lldb_private::NativeRegisterContext::ReadRegisterValueFromMemory
virtual Status ReadRegisterValueFromMemory(const lldb_private::RegisterInfo *reg_info, lldb::addr_t src_addr, size_t src_len, RegisterValue &reg_value)
Definition: NativeRegisterContext.cpp:316
lldb_private::NativeRegisterContext::GetExpeditedRegisters
virtual std::vector< uint32_t > GetExpeditedRegisters(ExpeditedRegs expType) const
Definition: NativeRegisterContext.cpp:441
lldb_private::NativeRegisterContext::SetSP
Status SetSP(lldb::addr_t sp)
Definition: NativeRegisterContext.cpp:159
lldb_private::GetLogIfAllCategoriesSet
Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: Logging.cpp:58
lldb_private::NativeRegisterContext::NumSupportedHardwareBreakpoints
virtual uint32_t NumSupportedHardwareBreakpoints()
Definition: NativeRegisterContext.cpp:248
lldb_private::RegisterValue::kMaxRegisterByteSize
@ kMaxRegisterByteSize
Definition: RegisterValue.h:31
sp
@ sp
Definition: CompactUnwindInfo.cpp:1249
lldb_private::NativeRegisterContext::GetRegisterSet
virtual const RegisterSet * GetRegisterSet(uint32_t set_index) const =0
NativeProcessProtocol.h
lldb_private::NativeRegisterContext::~NativeRegisterContext
virtual ~NativeRegisterContext()
lldb_private::RegisterValue::SetFromMemoryData
uint32_t SetFromMemoryData(const RegisterInfo *reg_info, const void *src, uint32_t src_len, lldb::ByteOrder src_byte_order, Status &error)
Definition: RegisterValue.cpp:84
lldb_private::NativeRegisterContext::ClearHardwareBreakpoint
virtual bool ClearHardwareBreakpoint(uint32_t hw_idx)
Definition: NativeRegisterContext.cpp:259
lldb_private::Status
Definition: Status.h:44
lldb_private::NativeRegisterContext::WriteRegisterValueToMemory
virtual Status WriteRegisterValueToMemory(const lldb_private::RegisterInfo *reg_info, lldb::addr_t dst_addr, size_t dst_len, const RegisterValue &reg_value)
Definition: NativeRegisterContext.cpp:386
uint32_t
lldb_private::RegisterValue::SetUInt
bool SetUInt(uint64_t uint, uint32_t byte_size)
Definition: RegisterValue.cpp:734
lldb_private::NativeRegisterContext::GetFP
lldb::addr_t GetFP(lldb::addr_t fail_value=LLDB_INVALID_ADDRESS)
Definition: NativeRegisterContext.cpp:165
lldb_private::NativeRegisterContext::GetRegisterSetCount
virtual uint32_t GetRegisterSetCount() const =0
NativeThreadProtocol.h
LLDB_REGNUM_GENERIC_SP
#define LLDB_REGNUM_GENERIC_SP
Definition: lldb-defines.h:64
lldb_private::RegisterValue::GetAsMemoryData
uint32_t GetAsMemoryData(const RegisterInfo *reg_info, void *dst, uint32_t dst_len, lldb::ByteOrder dst_byte_order, Status &error) const
Definition: RegisterValue.cpp:38
lldb_private::NativeProcessProtocol
Definition: NativeProcessProtocol.h:47
lldb_private::NativeThreadProtocol::GetID
lldb::tid_t GetID() const
Definition: NativeThreadProtocol.h:35
lldb_private::NativeRegisterContext::GetHardwareBreakHitIndex
virtual Status GetHardwareBreakHitIndex(uint32_t &bp_index, lldb::addr_t trap_addr)
Definition: NativeRegisterContext.cpp:263
LLDB_INVALID_ADDRESS
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:86
lldb_private::NativeRegisterContext::GetPC
lldb::addr_t GetPC(lldb::addr_t fail_value=LLDB_INVALID_ADDRESS)
Definition: NativeRegisterContext.cpp:124
lldb_private::NativeRegisterContext::ClearAllHardwareWatchpoints
virtual Status ClearAllHardwareWatchpoints()
Definition: NativeRegisterContext.cpp:285
lldb_private::NativeRegisterContext::NumSupportedHardwareWatchpoints
virtual uint32_t NumSupportedHardwareWatchpoints()
Definition: NativeRegisterContext.cpp:269
lldb_private::NativeProcessProtocol::GetByteOrder
lldb::ByteOrder GetByteOrder() const
Definition: NativeProcessProtocol.h:184
lldb_private::NativeRegisterContext::m_thread
NativeThreadProtocol & m_thread
Definition: NativeRegisterContext.h:176
lldb_private::NativeRegisterContext::GetPCfromBreakpointLocation
virtual lldb::addr_t GetPCfromBreakpointLocation(lldb::addr_t fail_value=LLDB_INVALID_ADDRESS)
Definition: NativeRegisterContext.cpp:143
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
LLDB_REGNUM_GENERIC_FP
#define LLDB_REGNUM_GENERIC_FP
Definition: lldb-defines.h:65
PosixApi.h
LLDB_REGNUM_GENERIC_PC
#define LLDB_REGNUM_GENERIC_PC
Definition: lldb-defines.h:63
LLDB_INVALID_INDEX32
#define LLDB_INVALID_INDEX32
Definition: lldb-defines.h:87
lldb_private::Log
Definition: Log.h:49
lldb_private::NativeRegisterContext::WriteRegister
virtual Status WriteRegister(const RegisterInfo *reg_info, const RegisterValue &reg_value)=0
lldb_private::NativeRegisterContext::GetThreadID
virtual lldb::tid_t GetThreadID() const
Definition: NativeRegisterContext.cpp:244
lldb_private::NativeRegisterContext::GetFlags
lldb::addr_t GetFlags(lldb::addr_t fail_value=0)
Definition: NativeRegisterContext.cpp:183
fp
@ fp
Definition: CompactUnwindInfo.cpp:1247
lldb_private::NativeRegisterContext::SetHardwareWatchpoint
virtual uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags)
Definition: NativeRegisterContext.cpp:271
lldb
Definition: SBAddress.h:15
lldb_private::NativeRegisterContext::IsWatchpointHit
virtual Status IsWatchpointHit(uint32_t wp_index, bool &is_hit)
Definition: NativeRegisterContext.cpp:289
LIBLLDB_LOG_THREAD
#define LIBLLDB_LOG_THREAD
Definition: Logging.h:16
NativeRegisterContext.h
lldb_private::NativeProcessProtocol::ReadMemory
virtual Status ReadMemory(lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read)=0
lldb_private::NativeRegisterContext::GetWatchpointAddress
virtual lldb::addr_t GetWatchpointAddress(uint32_t wp_index)
Definition: NativeRegisterContext.cpp:306
lldb_private::NativeRegisterContext::GetReturnAddress
lldb::addr_t GetReturnAddress(lldb::addr_t fail_value=LLDB_INVALID_ADDRESS)
Definition: NativeRegisterContext.cpp:177
lldb::tid_t
uint64_t tid_t
Definition: lldb-types.h:86
lldb_private::ExpeditedRegs
ExpeditedRegs
Definition: NativeRegisterContext.h:19
lldb_private::ExpeditedRegs::Full
@ Full
LLDB_REGNUM_GENERIC_RA
#define LLDB_REGNUM_GENERIC_RA
Definition: lldb-defines.h:66