OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_DEBUG_PROC_MAPS_LINUX_H_ | 5 #ifndef BASE_DEBUG_PROC_MAPS_LINUX_H_ |
6 #define BASE_DEBUG_PROC_MAPS_LINUX_H_ | 6 #define BASE_DEBUG_PROC_MAPS_LINUX_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // Value of the inode. | 39 // Value of the inode. |
40 uint64_t inode; | 40 uint64_t inode; |
41 | 41 |
42 // Name of the file mapped into memory. | 42 // Name of the file mapped into memory. |
43 // | 43 // |
44 // NOTE: path names aren't guaranteed to point at valid files. For example, | 44 // NOTE: path names aren't guaranteed to point at valid files. For example, |
45 // "[heap]" and "[stack]" are used to represent the location of the process' | 45 // "[heap]" and "[stack]" are used to represent the location of the process' |
46 // heap and stack, respectively. | 46 // heap and stack, respectively. |
47 string path; | 47 string path; |
| 48 |
| 49 // The line from /proc/<pid>/maps that this struct represents. |
| 50 string line; |
48 }; | 51 }; |
49 | 52 |
50 // Parses /proc/<pid>/maps input data and stores in |regions|. Returns true | 53 // Parses /proc/<pid>/maps input data and stores in |regions|. Returns true |
51 // and updates |regions| if and only if all of |input| was successfully parsed. | 54 // and updates |regions| if and only if all of |input| was successfully parsed. |
52 bool ParseProcMaps(const std::string& input, | 55 bool ParseProcMaps(const std::string& input, |
53 std::vector<MappedMemoryRegion>* regions); | 56 std::vector<MappedMemoryRegion>* regions); |
54 | 57 |
55 } // namespace google_breakpad | 58 } // namespace google_breakpad |
56 | 59 |
57 #endif // BASE_DEBUG_PROC_MAPS_LINUX_H_ | 60 #endif // BASE_DEBUG_PROC_MAPS_LINUX_H_ |
OLD | NEW |