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

Side by Side Diff: src/client/mac/handler/dynamic_images.cc

Issue 1550933002: Let breakpad build with -Wall on OS X and Linux. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: . Created 4 years, 11 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 | « no previous file | src/common/dwarf/dwarf2reader.h » ('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) 2007, Google Inc. 1 // Copyright (c) 2007, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 cpu_type); 357 cpu_type);
358 358
359 if(invalidEntriesCount != 0) { 359 if(invalidEntriesCount != 0) {
360 return 0; 360 return 0;
361 } 361 }
362 362
363 assert(list.n_value); 363 assert(list.n_value);
364 return list.n_value; 364 return list.n_value;
365 } 365 }
366 366
367 #if TARGET_OS_IPHONE 367 #if TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
368 static bool HasTaskDyldInfo() { 368 static bool HasTaskDyldInfo() {
369 return true; 369 return true;
370 } 370 }
371 #else 371 #else
372 static SInt32 GetOSVersionInternal() { 372 static SInt32 GetOSVersionInternal() {
373 SInt32 os_version = 0; 373 SInt32 os_version = 0;
374 Gestalt(gestaltSystemVersion, &os_version); 374 Gestalt(gestaltSystemVersion, &os_version);
375 return os_version; 375 return os_version;
376 } 376 }
377 377
378 static SInt32 GetOSVersion() { 378 static SInt32 GetOSVersion() {
379 static SInt32 os_version = GetOSVersionInternal(); 379 static SInt32 os_version = GetOSVersionInternal();
380 return os_version; 380 return os_version;
381 } 381 }
382 382
383 static bool HasTaskDyldInfo() { 383 static bool HasTaskDyldInfo() {
384 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
385 return true;
386 #else
387 return GetOSVersion() >= 0x1060; 384 return GetOSVersion() >= 0x1060;
388 #endif
389 } 385 }
390 #endif // TARGET_OS_IPHONE 386 #endif // TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 10_6
391 387
392 uint64_t DynamicImages::GetDyldAllImageInfosPointer() { 388 uint64_t DynamicImages::GetDyldAllImageInfosPointer() {
393 if (HasTaskDyldInfo()) { 389 if (HasTaskDyldInfo()) {
394 task_dyld_info_data_t task_dyld_info; 390 task_dyld_info_data_t task_dyld_info;
395 mach_msg_type_number_t count = TASK_DYLD_INFO_COUNT; 391 mach_msg_type_number_t count = TASK_DYLD_INFO_COUNT;
396 if (task_info(task_, TASK_DYLD_INFO, (task_info_t)&task_dyld_info, 392 if (task_info(task_, TASK_DYLD_INFO, (task_info_t)&task_dyld_info,
397 &count) != KERN_SUCCESS) { 393 &count) != KERN_SUCCESS) {
398 return 0; 394 return 0;
399 } 395 }
400 396
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 cpu_type_t cpu_type; 564 cpu_type_t cpu_type;
569 size_t cpuTypeSize = sizeof(cpu_type); 565 size_t cpuTypeSize = sizeof(cpu_type);
570 sysctl(mib, static_cast<u_int>(mibLen), &cpu_type, &cpuTypeSize, 0, 0); 566 sysctl(mib, static_cast<u_int>(mibLen), &cpu_type, &cpuTypeSize, 0, 0);
571 return cpu_type; 567 return cpu_type;
572 } 568 }
573 569
574 return GetNativeCPUType(); 570 return GetNativeCPUType();
575 } 571 }
576 572
577 } // namespace google_breakpad 573 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « no previous file | src/common/dwarf/dwarf2reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698