Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: base/debug/proc_maps_linux.cc

Issue 185423006: Eliminate build warnings in base/ for Android x64 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/debug/stack_trace_android.cc » ('j') | base/debug/stack_trace_android.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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) 9 #if defined(OS_LINUX)
10 #include <inttypes.h> 10 #include <inttypes.h>
11 #endif 11 #endif
12 12
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/strings/string_split.h" 14 #include "base/strings/string_split.h"
15 15
16 #if defined(OS_ANDROID) 16 #if defined(OS_ANDROID)
17 // Bionic's inttypes.h defines PRI/SCNxPTR as an unsigned long int, which 17 // Bionic's inttypes.h defines PRI/SCNxPTR as an unsigned long int, which
18 // is incompatible with Bionic's stdint.h defining uintptr_t as a unsigned int: 18 // is incompatible with Bionic's stdint.h defining uintptr_t as a unsigned int:
19 // https://code.google.com/p/android/issues/detail?id=57218 19 // https://code.google.com/p/android/issues/detail?id=57218
20 #undef SCNxPTR 20 #undef SCNxPTR
21 #ifdef __LP64__
22 #define SCNxPTR "lx"
23 #else
rmcilroy 2014/03/03 10:55:05 Since SCNxPTR is already defined as "lx" by Bionic
21 #define SCNxPTR "x" 24 #define SCNxPTR "x"
22 #endif 25 #endif
26 #endif
23 27
24 namespace base { 28 namespace base {
25 namespace debug { 29 namespace debug {
26 30
27 // Scans |proc_maps| starting from |pos| returning true if the gate VMA was 31 // Scans |proc_maps| starting from |pos| returning true if the gate VMA was
28 // found, otherwise returns false. 32 // found, otherwise returns false.
29 static bool ContainsGateVMA(std::string* proc_maps, size_t pos) { 33 static bool ContainsGateVMA(std::string* proc_maps, size_t pos) {
30 #if defined(ARCH_CPU_ARM_FAMILY) 34 #if defined(ARCH_CPU_ARM_FAMILY)
31 // The gate VMA on ARM kernels is the interrupt vectors page. 35 // The gate VMA on ARM kernels is the interrupt vectors page.
32 return proc_maps->find(" [vectors]\n", pos) != std::string::npos; 36 return proc_maps->find(" [vectors]\n", pos) != std::string::npos;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 regions.push_back(region); 157 regions.push_back(region);
154 regions.back().path.assign(line + path_index); 158 regions.back().path.assign(line + path_index);
155 } 159 }
156 160
157 regions_out->swap(regions); 161 regions_out->swap(regions);
158 return true; 162 return true;
159 } 163 }
160 164
161 } // namespace debug 165 } // namespace debug
162 } // namespace base 166 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/debug/stack_trace_android.cc » ('j') | base/debug/stack_trace_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698