1 //===-- RegisterContextPOSIX.h --------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_RegisterContextPOSIX_H_
11 #define liblldb_RegisterContextPOSIX_H_
15 // Other libraries and framework includes
16 #include "lldb/Target/RegisterContext.h"
18 //------------------------------------------------------------------------------
19 /// @class RegisterContextPOSIX
21 /// @brief Extends RegisterClass with a few virtual operations useful on POSIX.
22 class RegisterContextPOSIX
23 : public lldb_private::RegisterContext
26 RegisterContextPOSIX(lldb_private::Thread &thread,
27 uint32_t concrete_frame_idx)
28 : RegisterContext(thread, concrete_frame_idx)
29 { m_watchpoints_initialized = false; }
31 /// Updates the register state of the associated thread after hitting a
32 /// breakpoint (if that make sense for the architecture). Default
33 /// implementation simply returns true for architectures which do not
34 /// require any update.
37 /// True if the operation succeeded and false otherwise.
38 virtual bool UpdateAfterBreakpoint() { return true; }
40 /// Determines the index in lldb's register file given a kernel byte offset.
42 GetRegisterIndexFromOffset(unsigned offset) { return LLDB_INVALID_REGNUM; }
44 // Checks to see if a watchpoint specified by hw_index caused the inferior
47 IsWatchpointHit (uint32_t hw_index) { return false; }
49 // Resets any watchpoints that have been hit.
51 ClearWatchpointHits () { return false; }
53 // Returns the watchpoint address associated with a watchpoint hardware
56 GetWatchpointAddress (uint32_t hw_index) { return LLDB_INVALID_ADDRESS; }
59 IsWatchpointVacant (uint32_t hw_index) { return false; }
62 SetHardwareWatchpointWithIndex (lldb::addr_t addr, size_t size,
63 bool read, bool write,
64 uint32_t hw_index) { return false; }
67 bool m_watchpoints_initialized;
70 #endif // #ifndef liblldb_RegisterContextPOSIX_H_