Constructor
GumMemoryAccessMonitornew
Declaration [src]
GumMemoryAccessMonitor*
gum_memory_access_monitor_new (
const GumMemoryRange* ranges,
guint num_ranges,
GumPageProtection access_mask,
gboolean auto_reset,
GumMemoryAccessNotify func,
gpointer data,
GDestroyNotify data_destroy
)
Description [src]
Creates a monitor for the given ranges, each rounded out to page granularity.
Call gum_memory_access_monitor_enable() to start watching.
Parameters
ranges-
Type: An array of
GumMemoryRangeThe memory ranges to monitor.
The length of the array is specified in the num_rangesargument.The data is owned by the caller of the function. num_ranges-
Type:
guintThe number of ranges.
access_mask-
Type:
GumPageProtectionWhich access types to watch, as a mask of
GumPageProtectionbits (e.g.GUM_PAGE_WRITEto catch writes); these permissions are removed from the pages so matching accesses fault and get reported. auto_reset-
Type:
gbooleanWhether to restore a page and stop watching it after its first matching access, instead of reporting every access.
func-
Type:
GumMemoryAccessNotifyFunction to call on each reported access.
data-
Type:
gpointerData to pass to
func.The argument can be NULL.The data is owned by the caller of the function. data_destroy-
Type:
GDestroyNotifyDestroy notify for
data.The argument can be NULL.
Return value
Type: GumMemoryAccessMonitor
A new GumMemoryAccessMonitor.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |