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

Side by Side Diff: src/tools/linux/md2core/minidump-2-core.cc

Issue 1418453011: [mips64] Support for mips n64 (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 fprintf(stderr, 486 fprintf(stderr,
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__) && _MIPS_SIM == _ABIO32
497 if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_MIPS) { 497 if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_MIPS) {
498 fprintf(stderr, 498 fprintf(stderr,
499 "This version of minidump-2-core only supports mips (32bit).\n"); 499 "This version of minidump-2-core only supports mips (32bit).\n");
vapier 2015/12/15 17:29:27 would be nice imo to put "o32" in here
mveljko 2015/12/17 13:36:24 Done.
500 _exit(1); 500 _exit(1);
501 } 501 }
502 #elif defined(__mips__) && _MIPS_SIM == _ABI64
503 if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_MIPS64) {
504 fprintf(stderr,
505 "This version of minidump-2-core only supports mips (64bit).\n");
vapier 2015/12/15 17:29:27 would be nice imo to put "o64" in here
mveljko 2015/12/17 13:36:24 Done.
506 _exit(1);
507 }
502 #else 508 #else
503 #error "This code has not been ported to your platform yet" 509 #error "This code has not been ported to your platform yet"
504 #endif 510 #endif
505 if (!strstr(full_file.GetAsciiMDString(sysinfo->csd_version_rva).c_str(), 511 if (!strstr(full_file.GetAsciiMDString(sysinfo->csd_version_rva).c_str(),
506 "Linux") && 512 "Linux") &&
507 sysinfo->platform_id != MD_OS_NACL) { 513 sysinfo->platform_id != MD_OS_NACL) {
508 fprintf(stderr, "This minidump was not generated by Linux or NaCl.\n"); 514 fprintf(stderr, "This minidump was not generated by Linux or NaCl.\n");
509 _exit(1); 515 _exit(1);
510 } 516 }
511 517
512 if (verbose) { 518 if (verbose) {
513 fprintf(stderr, 519 fprintf(stderr,
514 "MD_SYSTEM_INFO_STREAM:\n" 520 "MD_SYSTEM_INFO_STREAM:\n"
515 "Architecture: %s\n" 521 "Architecture: %s\n"
516 "Number of processors: %d\n" 522 "Number of processors: %d\n"
517 "Processor level: %d\n" 523 "Processor level: %d\n"
518 "Processor model: %d\n" 524 "Processor model: %d\n"
519 "Processor stepping: %d\n", 525 "Processor stepping: %d\n",
520 sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_X86 526 sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_X86
521 ? "i386" 527 ? "i386"
522 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_AMD64 528 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_AMD64
523 ? "x86-64" 529 ? "x86-64"
524 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_ARM 530 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_ARM
525 ? "ARM" 531 ? "ARM"
526 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_MIPS 532 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_MIPS
527 ? "MIPS" 533 ? "MIPS"
534 : sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_MIPS64
535 ? "MIPS64"
528 : "???", 536 : "???",
529 sysinfo->number_of_processors, 537 sysinfo->number_of_processors,
530 sysinfo->processor_level, 538 sysinfo->processor_level,
531 sysinfo->processor_revision >> 8, 539 sysinfo->processor_revision >> 8,
532 sysinfo->processor_revision & 0xFF); 540 sysinfo->processor_revision & 0xFF);
533 if (sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_X86 || 541 if (sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_X86 ||
534 sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_AMD64) { 542 sysinfo->processor_architecture == MD_CPU_ARCHITECTURE_AMD64) {
535 fputs("Vendor id: ", stderr); 543 fputs("Vendor id: ", stderr);
536 const char *nul = 544 const char *nul =
537 (const char *)memchr(sysinfo->cpu.x86_cpu_info.vendor_id, 0, 545 (const char *)memchr(sysinfo->cpu.x86_cpu_info.vendor_id, 0,
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 iter != crashinfo.mappings.end(); ++iter) { 1262 iter != crashinfo.mappings.end(); ++iter) {
1255 const CrashedProcess::Mapping& mapping = iter->second; 1263 const CrashedProcess::Mapping& mapping = iter->second;
1256 if (mapping.data.size()) { 1264 if (mapping.data.size()) {
1257 if (!writea(1, mapping.data.c_str(), mapping.data.size())) 1265 if (!writea(1, mapping.data.c_str(), mapping.data.size()))
1258 return 1; 1266 return 1;
1259 } 1267 }
1260 } 1268 }
1261 1269
1262 return 0; 1270 return 0;
1263 } 1271 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698