ttg::detail::MemoryWatchpoint_x86_64 Class Reference
Documentation
MemoryWatchpoint represents a hardware watchpoint for a memory location Implements a memory watchpoint on x86 ... only implemented for macOS so far this is a slightly tweaked version of https://m.habrahabr.ru/post/103073/ see also http://www.sandpile.org/x86/drx.htm for the x86 debugging register map.
Classes | |
class | Pool |
a singleton pool of MemoryWatchpoint objects More... | |
Public Types | |
enum | DebugRegister { kDR0 = 0 , kDR1 = 1 , kDR2 = 2 , kDR3 = 3 } |
enum | Size { kByte = 0 , kHalfWord = 1 , kWord = 3 , kSizeMask = 3 } |
enum | BreakState { kDisabled = 0 , kEnabledLocally = 1 , kEnabledGlobally = 2 , kBreakStateMask = 3 } |
enum | Condition { kWhenExecuted = 0 , kWhenWritten = 1 , kWhenWrittenOrRead = 3 , kConditionMask = 3 } |
Public Member Functions | |
MemoryWatchpoint_x86_64 (void *addr, Size size, Condition cond, DebugRegister dr, const pthread_t *thread) | |
creates a MemoryWatchpoint watching memory window [addr,addr+size) for condition cond from threads threads More... | |
~MemoryWatchpoint_x86_64 () | |
void * | address () const |
Size | size () const |
Condition | condition () const |
DebugRegister | debug_register () const |
Friends | |
class | MemoryWatchPool |
Member Enumeration Documentation
◆ BreakState
◆ Condition
◆ DebugRegister
◆ Size
Constructor & Destructor Documentation
◆ MemoryWatchpoint_x86_64()
|
inline |
creates a MemoryWatchpoint watching memory window [addr,addr+size) for condition
cond
from threads threads
- Parameters
-
[in] addr the beginning of the memory window [in] size the size of the memory window [in] cond the condition to watch for [in] dr the debugging register to use [in] thread the thread to watch
- Exceptions
-
std::runtime_error if setting the watchpoint fails (either due to the lack of available registers or another reason)
◆ ~MemoryWatchpoint_x86_64()
|
inline |
Member Function Documentation
◆ address()
|
inline |
◆ condition()
|
inline |
◆ debug_register()
|
inline |
◆ size()
|
inline |
Friends And Related Function Documentation
◆ MemoryWatchPool
The documentation for this class was generated from the following file:
- ttg/ttg/util/bug.h