| OLD | NEW |
| 1 // Copyright (c) 2010, Google Inc. | 1 // Copyright (c) 2010, 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 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 #if defined(__i386__) || defined(__x86_64__) | 810 #if defined(__i386__) || defined(__x86_64__) |
| 811 { "model", 0, false }, | 811 { "model", 0, false }, |
| 812 { "stepping", 0, false }, | 812 { "stepping", 0, false }, |
| 813 { "cpu family", 0, false }, | 813 { "cpu family", 0, false }, |
| 814 #endif | 814 #endif |
| 815 }; | 815 }; |
| 816 | 816 |
| 817 // processor_architecture should always be set, do this first | 817 // processor_architecture should always be set, do this first |
| 818 sys_info->processor_architecture = | 818 sys_info->processor_architecture = |
| 819 #if defined(__mips__) | 819 #if defined(__mips__) |
| 820 # if _MIPS_SIM == _ABIO32 |
| 820 MD_CPU_ARCHITECTURE_MIPS; | 821 MD_CPU_ARCHITECTURE_MIPS; |
| 822 # elif _MIPS_SIM == _ABI64 |
| 823 MD_CPU_ARCHITECTURE_MIPS64; |
| 824 # else |
| 825 # error "This mips ABI is currently not supported (n32)" |
| 826 #endif |
| 821 #elif defined(__i386__) | 827 #elif defined(__i386__) |
| 822 MD_CPU_ARCHITECTURE_X86; | 828 MD_CPU_ARCHITECTURE_X86; |
| 823 #else | 829 #else |
| 824 MD_CPU_ARCHITECTURE_AMD64; | 830 MD_CPU_ARCHITECTURE_AMD64; |
| 825 #endif | 831 #endif |
| 826 | 832 |
| 827 const int fd = sys_open("/proc/cpuinfo", O_RDONLY, 0); | 833 const int fd = sys_open("/proc/cpuinfo", O_RDONLY, 0); |
| 828 if (fd < 0) | 834 if (fd < 0) |
| 829 return false; | 835 return false; |
| 830 | 836 |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 const MappingList& mappings, | 1351 const MappingList& mappings, |
| 1346 const AppMemoryList& appmem, | 1352 const AppMemoryList& appmem, |
| 1347 LinuxDumper* dumper) { | 1353 LinuxDumper* dumper) { |
| 1348 MinidumpWriter writer(filename, -1, NULL, mappings, appmem, dumper); | 1354 MinidumpWriter writer(filename, -1, NULL, mappings, appmem, dumper); |
| 1349 if (!writer.Init()) | 1355 if (!writer.Init()) |
| 1350 return false; | 1356 return false; |
| 1351 return writer.Dump(); | 1357 return writer.Dump(); |
| 1352 } | 1358 } |
| 1353 | 1359 |
| 1354 } // namespace google_breakpad | 1360 } // namespace google_breakpad |
| OLD | NEW |