1 /* Linux-specific memory maps manipulation routines.
2 Copyright (C) 2015 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 #ifndef NAT_LINUX_MAPS_H
20 #define NAT_LINUX_MAPS_H
23 read_mapping (const char *line
,
24 ULONGEST
*addr
, ULONGEST
*endaddr
,
25 const char **permissions
, size_t *permissions_len
,
27 const char **device
, size_t *device_len
,
29 const char **filename
);
31 /* Callback function for linux_find_memory_regions_full. If it returns
32 non-zero linux_find_memory_regions_full returns immediately with that
35 typedef int linux_find_memory_region_ftype (ULONGEST vaddr
, ULONGEST size
,
36 ULONGEST offset
, ULONGEST inode
,
38 int exec
, int modified
,
42 /* This enum represents the values that the user can choose when
43 informing the Linux kernel about which memory mappings will be
44 dumped in a corefile. They are described in the file
45 Documentation/filesystems/proc.txt, inside the Linux kernel
50 COREFILTER_ANON_PRIVATE
= 1 << 0,
51 COREFILTER_ANON_SHARED
= 1 << 1,
52 COREFILTER_MAPPED_PRIVATE
= 1 << 2,
53 COREFILTER_MAPPED_SHARED
= 1 << 3,
54 COREFILTER_ELF_HEADERS
= 1 << 4,
55 COREFILTER_HUGETLB_PRIVATE
= 1 << 5,
56 COREFILTER_HUGETLB_SHARED
= 1 << 6,
60 linux_find_memory_regions_full (pid_t pid
, enum filterflags filterflags
,
61 linux_find_memory_region_ftype
*func
,
64 #endif /* NAT_LINUX_MAPS_H */