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

Side by Side Diff: src/processor/minidump.cc

Issue 1418453011: [mips64] Support for mips n64 (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: addressing comments Created 5 years 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) 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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 fpe_index < MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT; 1014 fpe_index < MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT;
1015 ++fpe_index) { 1015 ++fpe_index) {
1016 Swap(&context_arm->float_save.extra[fpe_index]); 1016 Swap(&context_arm->float_save.extra[fpe_index]);
1017 } 1017 }
1018 } 1018 }
1019 SetContextARM(context_arm.release()); 1019 SetContextARM(context_arm.release());
1020 1020
1021 break; 1021 break;
1022 } 1022 }
1023 1023
1024 case MD_CONTEXT_MIPS: { 1024 case MD_CONTEXT_MIPS:
1025 case MD_CONTEXT_MIPS64: {
1025 if (expected_size != sizeof(MDRawContextMIPS)) { 1026 if (expected_size != sizeof(MDRawContextMIPS)) {
1026 BPLOG(ERROR) << "MinidumpContext MIPS size mismatch, " 1027 BPLOG(ERROR) << "MinidumpContext MIPS size mismatch, "
1027 << expected_size 1028 << expected_size
1028 << " != " 1029 << " != "
1029 << sizeof(MDRawContextMIPS); 1030 << sizeof(MDRawContextMIPS);
1030 return false; 1031 return false;
1031 } 1032 }
1032 1033
1033 scoped_ptr<MDRawContextMIPS> context_mips(new MDRawContextMIPS()); 1034 scoped_ptr<MDRawContextMIPS> context_mips(new MDRawContextMIPS());
1034 1035
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 1163
1163 case MD_CONTEXT_ARM64: 1164 case MD_CONTEXT_ARM64:
1164 if (system_info_cpu_type == MD_CPU_ARCHITECTURE_ARM64) 1165 if (system_info_cpu_type == MD_CPU_ARCHITECTURE_ARM64)
1165 return_value = true; 1166 return_value = true;
1166 break; 1167 break;
1167 1168
1168 case MD_CONTEXT_MIPS: 1169 case MD_CONTEXT_MIPS:
1169 if (system_info_cpu_type == MD_CPU_ARCHITECTURE_MIPS) 1170 if (system_info_cpu_type == MD_CPU_ARCHITECTURE_MIPS)
1170 return_value = true; 1171 return_value = true;
1171 break; 1172 break;
1173
1174 case MD_CONTEXT_MIPS64:
1175 if (system_info_cpu_type == MD_CPU_ARCHITECTURE_MIPS64)
1176 return_value = true;
1177 break;
1172 } 1178 }
1173 1179
1174 BPLOG_IF(ERROR, !return_value) << "MinidumpContext CPU " << 1180 BPLOG_IF(ERROR, !return_value) << "MinidumpContext CPU " <<
1175 HexString(context_cpu_type) << 1181 HexString(context_cpu_type) <<
1176 " wrong for MinidumpSystemInfo CPU " << 1182 " wrong for MinidumpSystemInfo CPU " <<
1177 HexString(system_info_cpu_type); 1183 HexString(system_info_cpu_type);
1178 1184
1179 return return_value; 1185 return return_value;
1180 } 1186 }
1181 1187
(...skipping 3032 matching lines...) Expand 10 before | Expand all | Expand 10 after
4214 GetSystemInfo() ? GetSystemInfo()->system_info() : NULL; 4220 GetSystemInfo() ? GetSystemInfo()->system_info() : NULL;
4215 4221
4216 if (system_info != NULL) { 4222 if (system_info != NULL) {
4217 switch (system_info->processor_architecture) { 4223 switch (system_info->processor_architecture) {
4218 case MD_CPU_ARCHITECTURE_X86: 4224 case MD_CPU_ARCHITECTURE_X86:
4219 *context_cpu_flags = MD_CONTEXT_X86; 4225 *context_cpu_flags = MD_CONTEXT_X86;
4220 break; 4226 break;
4221 case MD_CPU_ARCHITECTURE_MIPS: 4227 case MD_CPU_ARCHITECTURE_MIPS:
4222 *context_cpu_flags = MD_CONTEXT_MIPS; 4228 *context_cpu_flags = MD_CONTEXT_MIPS;
4223 break; 4229 break;
4230 case MD_CPU_ARCHITECTURE_MIPS64:
4231 *context_cpu_flags = MD_CONTEXT_MIPS64;
4232 break;
4224 case MD_CPU_ARCHITECTURE_ALPHA: 4233 case MD_CPU_ARCHITECTURE_ALPHA:
4225 *context_cpu_flags = MD_CONTEXT_ALPHA; 4234 *context_cpu_flags = MD_CONTEXT_ALPHA;
4226 break; 4235 break;
4227 case MD_CPU_ARCHITECTURE_PPC: 4236 case MD_CPU_ARCHITECTURE_PPC:
4228 *context_cpu_flags = MD_CONTEXT_PPC; 4237 *context_cpu_flags = MD_CONTEXT_PPC;
4229 break; 4238 break;
4230 case MD_CPU_ARCHITECTURE_PPC64: 4239 case MD_CPU_ARCHITECTURE_PPC64:
4231 *context_cpu_flags = MD_CONTEXT_PPC64; 4240 *context_cpu_flags = MD_CONTEXT_PPC64;
4232 break; 4241 break;
4233 case MD_CPU_ARCHITECTURE_SHX: 4242 case MD_CPU_ARCHITECTURE_SHX:
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
4789 return NULL; 4798 return NULL;
4790 } 4799 }
4791 4800
4792 *stream = new_stream.release(); 4801 *stream = new_stream.release();
4793 info->stream = *stream; 4802 info->stream = *stream;
4794 return *stream; 4803 return *stream;
4795 } 4804 }
4796 4805
4797 4806
4798 } // namespace google_breakpad 4807 } // namespace google_breakpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698