qapi: Remove QMP events and commands from user-mode builds
[qemu/ar7.git] / include / qemu / selfmap.h
blob8382c4c779dc91851d029b40b4e180cc399969e1
1 /*
2 * Utility functions to read our own memory map
4 * Copyright (c) 2020 Linaro Ltd
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
9 #ifndef _SELFMAP_H_
10 #define _SELFMAP_H_
12 typedef struct {
13 unsigned long start;
14 unsigned long end;
16 /* flags */
17 bool is_read;
18 bool is_write;
19 bool is_exec;
20 bool is_priv;
22 unsigned long offset;
23 gchar *dev;
24 uint64_t inode;
25 gchar *path;
26 } MapInfo;
29 /**
30 * read_self_maps:
32 * Read /proc/self/maps and return a list of MapInfo structures.
34 GSList *read_self_maps(void);
36 /**
37 * free_self_maps:
38 * @info: a GSlist
40 * Free a list of MapInfo structures.
42 void free_self_maps(GSList *info);
44 #endif /* _SELFMAP_H_ */