-
Notifications
You must be signed in to change notification settings - Fork 243
/
gummemoryaccessmonitor.h
47 lines (35 loc) · 1.31 KB
/
gummemoryaccessmonitor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Copyright (C) 2010-2022 Ole André Vadla Ravnås <[email protected]>
*
* Licence: wxWindows Library Licence, Version 3.1
*/
#ifndef __GUM_MEMORY_ACCESS_MONITOR_H__
#define __GUM_MEMORY_ACCESS_MONITOR_H__
#include <gum/gummemory.h>
G_BEGIN_DECLS
#define GUM_TYPE_MEMORY_ACCESS_MONITOR (gum_memory_access_monitor_get_type ())
GUM_DECLARE_FINAL_TYPE (GumMemoryAccessMonitor, gum_memory_access_monitor, GUM,
MEMORY_ACCESS_MONITOR, GObject)
typedef struct _GumMemoryAccessDetails GumMemoryAccessDetails;
typedef void (* GumMemoryAccessNotify) (GumMemoryAccessMonitor * monitor,
const GumMemoryAccessDetails * details, gpointer user_data);
struct _GumMemoryAccessDetails
{
GumMemoryOperation operation;
gpointer from;
gpointer address;
guint range_index;
guint page_index;
guint pages_completed;
guint pages_total;
};
GUM_API 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);
GUM_API gboolean gum_memory_access_monitor_enable (
GumMemoryAccessMonitor * self, GError ** error);
GUM_API void gum_memory_access_monitor_disable (GumMemoryAccessMonitor * self);
G_END_DECLS
#endif