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.
More...
#include <bug.h>
|
| class | Pool |
| | a singleton pool of MemoryWatchpoint objects More...
|
| |
|
| 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
} |
| |
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.
Definition at line 50 of file bug.h.
◆ BreakState
| Enumerator |
|---|
| kDisabled | |
| kEnabledLocally | |
| kEnabledGlobally | |
| kBreakStateMask | |
Definition at line 64 of file bug.h.
◆ Condition
| Enumerator |
|---|
| kWhenExecuted | |
| kWhenWritten | |
| kWhenWrittenOrRead | |
| kConditionMask | |
Definition at line 71 of file bug.h.
◆ DebugRegister
| Enumerator |
|---|
| kDR0 | |
| kDR1 | |
| kDR2 | |
| kDR3 | |
Definition at line 54 of file bug.h.
◆ Size
| Enumerator |
|---|
| kByte | |
| kHalfWord | |
| kWord | |
| kSizeMask | |
Definition at line 56 of file bug.h.
◆ MemoryWatchpoint_x86_64()
| ttg::detail::MemoryWatchpoint_x86_64::MemoryWatchpoint_x86_64 |
( |
void * |
addr, |
|
|
Size |
size, |
|
|
Condition |
cond, |
|
|
DebugRegister |
dr, |
|
|
const pthread_t * |
thread |
|
) |
| |
|
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) |
Definition at line 184 of file bug.h.
◆ ~MemoryWatchpoint_x86_64()
| ttg::detail::MemoryWatchpoint_x86_64::~MemoryWatchpoint_x86_64 |
( |
| ) |
|
|
inline |
◆ address()
| void * ttg::detail::MemoryWatchpoint_x86_64::address |
( |
| ) |
const |
|
inline |
◆ condition()
| Condition ttg::detail::MemoryWatchpoint_x86_64::condition |
( |
| ) |
const |
|
inline |
◆ debug_register()
| DebugRegister ttg::detail::MemoryWatchpoint_x86_64::debug_register |
( |
| ) |
const |
|
inline |
◆ size()
| Size ttg::detail::MemoryWatchpoint_x86_64::size |
( |
| ) |
const |
|
inline |
◆ MemoryWatchPool
| friend class MemoryWatchPool |
|
friend |
The documentation for this class was generated from the following file: