OLD | NEW |
1 // Copyright (c) 2009, Google Inc. | 1 // Copyright (c) 2009, 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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 "This version of minidump-2-core only supports ARM (32bit).\n"); | 487 "This version of minidump-2-core only supports ARM (32bit).\n"); |
488 _exit(1); | 488 _exit(1); |
489 } | 489 } |
490 #elif defined(__aarch64__) | 490 #elif defined(__aarch64__) |
491 if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_ARM64) { | 491 if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_ARM64) { |
492 fprintf(stderr, | 492 fprintf(stderr, |
493 "This version of minidump-2-core only supports ARM (64bit).\n"); | 493 "This version of minidump-2-core only supports ARM (64bit).\n"); |
494 _exit(1); | 494 _exit(1); |
495 } | 495 } |
496 #elif defined(__mips__) | 496 #elif defined(__mips__) |
| 497 # if _MIPS_SIM == _ABIO32 |
497 if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_MIPS) { | 498 if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_MIPS) { |
498 fprintf(stderr, | 499 fprintf(stderr, |
499 "This version of minidump-2-core only supports mips (32bit).\n"); | 500 "This version of minidump-2-core only supports mips o32 (32bit).\n")
; |
500 _exit(1); | 501 _exit(1); |
501 } | 502 } |
| 503 # elif _MIPS_SIM == _ABI64 |
| 504 if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_MIPS64) { |
| 505 fprintf(stderr, |
| 506 "This version of minidump-2-core only supports mips n64 (64bit).\n")
; |
| 507 _exit(1); |
| 508 } |
| 509 # else |
| 510 # error "This mips ABI is currently not supported (n32)" |
| 511 # endif |
502 #else | 512 #else |
503 #error "This code has not been ported to your platform yet" | 513 #error "This code has not been ported to your platform yet" |
504 #endif | 514 #endif |
505 if (!strstr(full_file.GetAsciiMDString(sysinfo->csd_version_rva).c_str(), | 515 if (!strstr(full_file.GetAsciiMDString(sysinfo->csd_version_rva).c_str(), |
506 "Linux") && | 516 "Linux") && |
507 sysinfo->platform_id != MD_OS_NACL) { | 517 sysinfo->platform_id != MD_OS_NACL) { |
508 fprintf(stderr, "This minidump was not generated by Linux or NaCl.\n"); | 518 fprintf(stderr, "This minidump was not generated by Linux or NaCl.\n"); |
509 _exit(1); | 519 _exit(1); |
510 } | 520 } |
511 | 521 |
512 if (verbose) { | 522 if (verbose) { |
513 fprintf(stderr, | 523 fprintf(stderr, |
514 "MD_SYSTEM_INFO_STREAM:\n" | 524 "MD_SYSTEM_INFO_STREAM:\n" |
515 "Architecture: %s\n" | 525 "Architecture: %s\n" |
516 "Number of processors: %d\n" | 526 "Number of processors: %d\n" |
517 "Processor level: %d\n" | 527 "Processor level: %d\n" |
518 "Processor model: %d\n" | 528 "Processor model: %d\n" |
519 "Processor stepping: %d\n", | 529 "Processor stepping: %d\n", |
520 sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_X86 | 530 sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_X86 |
521 ? "i386" | 531 ? "i386" |
522 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_AMD64 | 532 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_AMD64 |
523 ? "x86-64" | 533 ? "x86-64" |
524 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_ARM | 534 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_ARM |
525 ? "ARM" | 535 ? "ARM" |
526 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_MIPS | 536 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_MIPS |
527 ? "MIPS" | 537 ? "MIPS" |
| 538 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_MIPS64 |
| 539 ? "MIPS64" |
528 : "???", | 540 : "???", |
529 sysinfo->number_of_processors, | 541 sysinfo->number_of_processors, |
530 sysinfo->processor_level, | 542 sysinfo->processor_level, |
531 sysinfo->processor_revision >> 8, | 543 sysinfo->processor_revision >> 8, |
532 sysinfo->processor_revision & 0xFF); | 544 sysinfo->processor_revision & 0xFF); |
533 if (sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_X86 || | 545 if (sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_X86 || |
534 sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_AMD64) { | 546 sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_AMD64) { |
535 fputs("Vendor id: ", stderr); | 547 fputs("Vendor id: ", stderr); |
536 const char *nul = | 548 const char *nul = |
537 (const char *)memchr(sysinfo->cpu.x86_cpu_info.vendor_id, 0, | 549 (const char *)memchr(sysinfo->cpu.x86_cpu_info.vendor_id, 0, |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1254 iter != crashinfo.mappings.end(); ++iter) { | 1266 iter != crashinfo.mappings.end(); ++iter) { |
1255 const CrashedProcess::Mapping& mapping = iter->second; | 1267 const CrashedProcess::Mapping& mapping = iter->second; |
1256 if (mapping.data.size()) { | 1268 if (mapping.data.size()) { |
1257 if (!writea(1, mapping.data.c_str(), mapping.data.size())) | 1269 if (!writea(1, mapping.data.c_str(), mapping.data.size())) |
1258 return 1; | 1270 return 1; |
1259 } | 1271 } |
1260 } | 1272 } |
1261 | 1273 |
1262 return 0; | 1274 return 0; |
1263 } | 1275 } |
OLD | NEW |