Note: Calling any of the API functions to set watchpoints adds the watchpoint to your <program>.watchpoints file. For more information about setting watchpoints, click
int purify_watch
(char *addr) |
These functions specify watchpoints that detect writes, allocations, deallocations, and entry and exit of memory addresses. The purify_watch_<num> and purify_watch_w_<num> functions are identical. You can specify watchpoints for variables of 1, 2, 4, and 8 bytes. The purify_watch function watches 4 bytes. (gdb) print purify_watch_1(&my_char) These functions return the number assigned to the watchpoint. |
int purify_watch_r_<num> (char *addr) <num>=1,2,4,8 |
Specifies a watchpoint that detects reads, allocations, deallocations, and entry and exit of memory addresses. Use to specify watchpoints for variables of 1, 2, 4, and 8 bytes. (gdb) print purify_watch_r_1(&read_only_char) This function returns the number assigned to the watchpoint. |
int purify_watch_rw_<num> (char *addr) <num>=1,2,4,8 |
Specifies a watchpoint that detects reads, writes, allocations, deallocations, and entry and exit of memory addresses. <num>=1, 2, 4, or 8. You can specify watchpoints for variables of 1, 2, 4, and 8 bytes. (gdb) print purify_watch_rw_1(&rw_char) This function returns the number assigned to the watchpoint. |
int purify_watch_n (char *addr, unsigned int size, char *type) |
Sets a watchpoint on an arbitrary-sized buffer. (gdb) print purify_watch_n(buf, sizeof(buf), "rw") This function returns the number assigned to the watchpoint. For interactive use, it is sometimes easier to call purify_watch_n
with |
int purify_watch_info (void) |
Lists all the active watchpoints and returns 0. |
int purify_watch_remove (int watchno) |
The function purify_watch_remove permanently removes from the <program>.watchpoints file the watchpoint specified by watchno. watchno is a watchpoint number as returned by purify_watch* functions, or as identified in the <program>.watchpoints file. The function purify_watch_remove_all removes all watchpoints. |