a singleton pool of MemoryWatchpoint objects
More...
#include <bug.h>
|
| static void | initialize_instance (const std::vector< const pthread_t * > &threads) |
| |
| static std::shared_ptr< Pool > | instance () |
| | accesses the unique pool; asserts that the default instance has been initialized by calling initialize()
|
| |
a singleton pool of MemoryWatchpoint objects
Definition at line 80 of file bug.h.
◆ ~Pool()
| ttg::detail::MemoryWatchpoint_x86_64::Pool::~Pool |
( |
| ) |
|
|
default |
◆ clear()
| Pool & ttg::detail::MemoryWatchpoint_x86_64::Pool::clear |
( |
void * |
addr, |
|
|
const pthread_t * |
thread |
|
) |
| |
|
inline |
Clear a watchpoint
- Parameters
-
| addr | address that is watched |
| thread | pointer to the pthread_t |
Definition at line 143 of file bug.h.
◆ find()
| MemoryWatchpoint_x86_64 * ttg::detail::MemoryWatchpoint_x86_64::Pool::find |
( |
void * |
addr, |
|
|
const pthread_t * |
thread |
|
) |
| |
|
inline |
Find watchpoint in thread thread and pointing to addr
- Parameters
-
| addr | base address to watch |
| thread | pointer to the pthread_t |
- Returns
- the pointer to the MemoryWatchpoint object; nullptr if such a watchpoint does not exist
Definition at line 131 of file bug.h.
◆ initialize_instance()
| static void ttg::detail::MemoryWatchpoint_x86_64::Pool::initialize_instance |
( |
const std::vector< const pthread_t * > & |
threads | ) |
|
|
inlinestatic |
Constructs the unique pool from a set of thread IDs
- Parameters
-
| threads | a vector of pthread_t obtained via pthread_self (for the main thread) and pthread_create for other threads; only pointers to these unique objects can be used in subsequent calls. |
Definition at line 90 of file bug.h.
◆ instance()
| static std::shared_ptr< Pool > ttg::detail::MemoryWatchpoint_x86_64::Pool::instance |
( |
| ) |
|
|
inlinestatic |
accesses the unique pool; asserts that the default instance has been initialized by calling initialize()
Definition at line 95 of file bug.h.
◆ set()
| Pool & ttg::detail::MemoryWatchpoint_x86_64::Pool::set |
( |
void * |
addr, |
|
|
Size |
size, |
|
|
Condition |
cond, |
|
|
const pthread_t * |
thread |
|
) |
| |
|
inline |
Sets a watchpoint in thread thread and pointing to size bytes starting at addr if cond holds
- Parameters
-
| addr | base address to watch |
| size | how many bytes to watch starting at address addr |
| cond | condition that need to hold to trigger the watchpoint |
| thread | pthread_t object |
- Exceptions
-
| std::runtime_error | if setting memory watchpoint failed |
- Returns
- reference to this
Definition at line 108 of file bug.h.
◆ nwatchpoints_per_thread
| constexpr const size_t ttg::detail::MemoryWatchpoint_x86_64::Pool::nwatchpoints_per_thread = 4 |
|
staticconstexpr |
Definition at line 82 of file bug.h.
The documentation for this class was generated from the following file: