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

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

Issue 656033009: Convert ARRAYSIZE_UNSAFE -> arraysize in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « base/debug/proc_maps_linux_unittest.cc ('k') | base/files/file_proxy_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/stack_trace.h" 5 #include "base/debug/stack_trace.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <signal.h> 9 #include <signal.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 { " cr2: ", context->uc_mcontext.gregs[REG_CR2] }, 336 { " cr2: ", context->uc_mcontext.gregs[REG_CR2] },
337 #endif 337 #endif
338 }; 338 };
339 339
340 #if ARCH_CPU_32_BITS 340 #if ARCH_CPU_32_BITS
341 const int kRegisterPadding = 8; 341 const int kRegisterPadding = 8;
342 #elif ARCH_CPU_64_BITS 342 #elif ARCH_CPU_64_BITS
343 const int kRegisterPadding = 16; 343 const int kRegisterPadding = 16;
344 #endif 344 #endif
345 345
346 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(registers); i++) { 346 for (size_t i = 0; i < arraysize(registers); i++) {
347 PrintToStderr(registers[i].label); 347 PrintToStderr(registers[i].label);
348 internal::itoa_r(registers[i].value, buf, sizeof(buf), 348 internal::itoa_r(registers[i].value, buf, sizeof(buf),
349 16, kRegisterPadding); 349 16, kRegisterPadding);
350 PrintToStderr(buf); 350 PrintToStderr(buf);
351 351
352 if ((i + 1) % 4 == 0) 352 if ((i + 1) % 4 == 0)
353 PrintToStderr("\n"); 353 PrintToStderr("\n");
354 } 354 }
355 PrintToStderr("\n"); 355 PrintToStderr("\n");
356 #endif 356 #endif
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 *ptr = *start; 826 *ptr = *start;
827 *start++ = ch; 827 *start++ = ch;
828 } 828 }
829 return buf; 829 return buf;
830 } 830 }
831 831
832 } // namespace internal 832 } // namespace internal
833 833
834 } // namespace debug 834 } // namespace debug
835 } // namespace base 835 } // namespace base
OLDNEW
« no previous file with comments | « base/debug/proc_maps_linux_unittest.cc ('k') | base/files/file_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698