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 #include "base/debug/proc_maps_linux.h" | 5 #include "base/debug/proc_maps_linux.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 | 8 |
9 #if defined(OS_LINUX) || defined(OS_ANDROID) | 9 #if defined(OS_LINUX) || defined(OS_ANDROID) |
10 #include <inttypes.h> | 10 #include <inttypes.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include "base/file_util.h" | 13 #include "base/files/file_util.h" |
14 #include "base/files/scoped_file.h" | 14 #include "base/files/scoped_file.h" |
15 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
16 | 16 |
17 #if defined(OS_ANDROID) && !defined(__LP64__) | 17 #if defined(OS_ANDROID) && !defined(__LP64__) |
18 // In 32-bit mode, Bionic's inttypes.h defines PRI/SCNxPTR as an | 18 // In 32-bit mode, Bionic's inttypes.h defines PRI/SCNxPTR as an |
19 // unsigned long int, which is incompatible with Bionic's stdint.h | 19 // unsigned long int, which is incompatible with Bionic's stdint.h |
20 // defining uintptr_t as an unsigned int: | 20 // defining uintptr_t as an unsigned int: |
21 // https://code.google.com/p/android/issues/detail?id=57218 | 21 // https://code.google.com/p/android/issues/detail?id=57218 |
22 #undef SCNxPTR | 22 #undef SCNxPTR |
23 #define SCNxPTR "x" | 23 #define SCNxPTR "x" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 regions.push_back(region); | 158 regions.push_back(region); |
159 regions.back().path.assign(line + path_index); | 159 regions.back().path.assign(line + path_index); |
160 } | 160 } |
161 | 161 |
162 regions_out->swap(regions); | 162 regions_out->swap(regions); |
163 return true; | 163 return true; |
164 } | 164 } |
165 | 165 |
166 } // namespace debug | 166 } // namespace debug |
167 } // namespace base | 167 } // namespace base |
OLD | NEW |