LLDB  mainline
RegisterContextWindows.h
Go to the documentation of this file.
1 //===-- RegisterContextWindows.h --------------------------------*- C++ -*-===//
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 
9 #ifndef liblldb_RegisterContextWindows_H_
10 #define liblldb_RegisterContextWindows_H_
11 
13 #include "lldb/lldb-forward.h"
14 
15 namespace lldb_private {
16 
17 class Thread;
18 
20 public:
21  // Constructors and Destructors
22  RegisterContextWindows(Thread &thread, uint32_t concrete_frame_idx);
23 
24  virtual ~RegisterContextWindows();
25 
26  // Subclasses must override these functions
27  void InvalidateAllRegisters() override;
28 
29  bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
30 
31  bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
32 
34  uint32_t num) override;
35 
36  bool HardwareSingleStep(bool enable) override;
37 
40  }
41  static constexpr bool DoHardwareBreakpointsTriggerAfter() { return true; }
42 
43  bool AddHardwareBreakpoint(uint32_t slot, lldb::addr_t address, uint32_t size,
44  bool read, bool write);
46 
48 
49 protected:
50  static constexpr unsigned NUM_HARDWARE_BREAKPOINT_SLOTS = 4;
51 
52  virtual bool CacheAllRegisterValues();
53  virtual bool ApplyAllRegisterValues();
54 
55  CONTEXT m_context;
57 };
58 } // namespace lldb_private
59 
60 #endif // #ifndef liblldb_RegisterContextWindows_H_
lldb_private::RegisterContextWindows::GetTriggeredHardwareBreakpointSlotId
uint32_t GetTriggeredHardwareBreakpointSlotId()
Definition: RegisterContextWindows.cpp:138
lldb_private::RegisterContextWindows::RegisterContextWindows
RegisterContextWindows(Thread &thread, uint32_t concrete_frame_idx)
Definition: RegisterContextWindows.cpp:28
lldb_private::RegisterContextWindows::ApplyAllRegisterValues
virtual bool ApplyAllRegisterValues()
Definition: RegisterContextWindows.cpp:183
lldb_private::RegisterContextWindows::DoHardwareBreakpointsTriggerAfter
static constexpr bool DoHardwareBreakpointsTriggerAfter()
Definition: RegisterContextWindows.h:41
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::RegisterContextWindows::HardwareSingleStep
bool HardwareSingleStep(bool enable) override
Definition: RegisterContextWindows.cpp:74
lldb_private::RegisterContextWindows::m_context
CONTEXT m_context
Definition: RegisterContextWindows.h:55
lldb_private::Thread
Definition: Thread.h:60
lldb_private::RegisterContextWindows::CacheAllRegisterValues
virtual bool CacheAllRegisterValues()
Definition: RegisterContextWindows.cpp:151
lldb_private::RegisterContextWindows::AddHardwareBreakpoint
bool AddHardwareBreakpoint(uint32_t slot, lldb::addr_t address, uint32_t size, bool read, bool write)
Definition: RegisterContextWindows.cpp:76
lldb_private::RegisterContextWindows::WriteAllRegisterValues
bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override
Definition: RegisterContextWindows.cpp:51
lldb_private::RegisterContextWindows::InvalidateAllRegisters
void InvalidateAllRegisters() override
Definition: RegisterContextWindows.cpp:35
lldb_private::RegisterContextWindows::ConvertRegisterKindToRegisterNumber
uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, uint32_t num) override
Convert from a given register numbering scheme to the lldb register numbering scheme.
Definition: RegisterContextWindows.cpp:59
lldb_private::RegisterContextWindows
Definition: RegisterContextWindows.h:19
lldb_private::RegisterContext
Definition: RegisterContext.h:17
lldb_private::RegisterContextWindows::ReadAllRegisterValues
bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override
Definition: RegisterContextWindows.cpp:39
lldb_private::RegisterContextWindows::NUM_HARDWARE_BREAKPOINT_SLOTS
static constexpr unsigned NUM_HARDWARE_BREAKPOINT_SLOTS
Definition: RegisterContextWindows.h:50
lldb::RegisterKind
RegisterKind
Register numbering types.
Definition: lldb-enumerations.h:227
lldb_private::RegisterContextWindows::~RegisterContextWindows
virtual ~RegisterContextWindows()
Definition: RegisterContextWindows.cpp:33
uint32_t
lldb_private::RegisterContextWindows::RemoveHardwareBreakpoint
bool RemoveHardwareBreakpoint(uint32_t slot)
Definition: RegisterContextWindows.cpp:121
lldb-forward.h
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::RegisterContextWindows::m_context_stale
bool m_context_stale
Definition: RegisterContextWindows.h:56
lldb_private::RegisterContextWindows::GetNumHardwareBreakpointSlots
static constexpr uint32_t GetNumHardwareBreakpointSlots()
Definition: RegisterContextWindows.h:38
RegisterContext.h