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

Side by Side Diff: src/client/linux/minidump_writer/minidump_writer.cc

Issue 1564293002: Fix compilation of breakpad on 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 | no next file » | 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) 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 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 // to happen properly. 997 // to happen properly.
998 return true; 998 return true;
999 } 999 }
1000 1000
1001 { 1001 {
1002 PageAllocator allocator; 1002 PageAllocator allocator;
1003 ProcCpuInfoReader* const reader = 1003 ProcCpuInfoReader* const reader =
1004 new(allocator) ProcCpuInfoReader(fd); 1004 new(allocator) ProcCpuInfoReader(fd);
1005 const char* field; 1005 const char* field;
1006 while (reader->GetNextField(&field)) { 1006 while (reader->GetNextField(&field)) {
1007 for (const CpuInfoEntry& entry : cpu_info_table) { 1007 for (const CpuIdEntry& entry : cpu_id_entries) {
1008 if (my_strcmp(entry.field, field) != 0) 1008 if (my_strcmp(entry.field, field) != 0)
1009 continue; 1009 continue;
1010 uintptr_t result = 0; 1010 uintptr_t result = 0;
1011 const char* value = reader->GetValue(); 1011 const char* value = reader->GetValue();
1012 const char* p = value; 1012 const char* p = value;
1013 if (value[0] == '0' && value[1] == 'x') { 1013 if (value[0] == '0' && value[1] == 'x') {
1014 p = my_read_hex_ptr(&result, value+2); 1014 p = my_read_hex_ptr(&result, value+2);
1015 } else if (entry.format == 'x') { 1015 } else if (entry.format == 'x') {
1016 p = my_read_hex_ptr(&result, value); 1016 p = my_read_hex_ptr(&result, value);
1017 } else { 1017 } else {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 size_t tag_len = value_len; 1076 size_t tag_len = value_len;
1077 const char* p = my_strchr(tag, ' '); 1077 const char* p = my_strchr(tag, ' ');
1078 if (p) { 1078 if (p) {
1079 tag_len = static_cast<size_t>(p - tag); 1079 tag_len = static_cast<size_t>(p - tag);
1080 value += tag_len + 1; 1080 value += tag_len + 1;
1081 value_len -= tag_len + 1; 1081 value_len -= tag_len + 1;
1082 } else { 1082 } else {
1083 tag_len = strlen(tag); 1083 tag_len = strlen(tag);
1084 value_len = 0; 1084 value_len = 0;
1085 } 1085 }
1086 for (const CpuInfoEntry& entry : cpu_features_entries) { 1086 for (const CpuFeaturesEntry& entry : cpu_features_entries) {
1087 if (tag_len == strlen(entry.tag) && 1087 if (tag_len == strlen(entry.tag) &&
1088 !memcmp(tag, entry.tag, tag_len)) { 1088 !memcmp(tag, entry.tag, tag_len)) {
1089 sys_info->cpu.arm_cpu_info.elf_hwcaps |= entry.hwcaps; 1089 sys_info->cpu.arm_cpu_info.elf_hwcaps |= entry.hwcaps;
1090 break; 1090 break;
1091 } 1091 }
1092 } 1092 }
1093 } 1093 }
1094 } 1094 }
1095 } 1095 }
1096 sys_close(fd); 1096 sys_close(fd);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 const MappingList& mappings, 1345 const MappingList& mappings,
1346 const AppMemoryList& appmem, 1346 const AppMemoryList& appmem,
1347 LinuxDumper* dumper) { 1347 LinuxDumper* dumper) {
1348 MinidumpWriter writer(filename, -1, NULL, mappings, appmem, dumper); 1348 MinidumpWriter writer(filename, -1, NULL, mappings, appmem, dumper);
1349 if (!writer.Init()) 1349 if (!writer.Init())
1350 return false; 1350 return false;
1351 return writer.Dump(); 1351 return writer.Dump();
1352 } 1352 }
1353 1353
1354 } // namespace google_breakpad 1354 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698