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 GumMemoryRange

The memory ranges to monitor.

The length of the array is specified in the num_ranges argument.
The data is owned by the caller of the function.
num_ranges

Type: guint

The number of ranges.

access_mask

Type: GumPageProtection

Which access types to watch, as a mask of GumPageProtection bits (e.g. GUM_PAGE_WRITE to catch writes); these permissions are removed from the pages so matching accesses fault and get reported.

auto_reset

Type: gboolean

Whether to restore a page and stop watching it after its first matching access, instead of reporting every access.

func

Type: GumMemoryAccessNotify

Function to call on each reported access.

data

Type: gpointer

Data to pass to func.

The argument can be NULL.
The data is owned by the caller of the function.
data_destroy

Type: GDestroyNotify

Destroy 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.