OLD | NEW |
1 // Copyright (c) 2014, Google Inc. | 1 // Copyright (c) 2014, 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 MD_FLOATINGSAVEAREA_ARM64_FPR_COUNT * 16); | 228 MD_FLOATINGSAVEAREA_ARM64_FPR_COUNT * 16); |
229 } | 229 } |
230 | 230 |
231 #elif defined(__mips__) | 231 #elif defined(__mips__) |
232 | 232 |
233 uintptr_t ThreadInfo::GetInstructionPointer() const { | 233 uintptr_t ThreadInfo::GetInstructionPointer() const { |
234 return mcontext.pc; | 234 return mcontext.pc; |
235 } | 235 } |
236 | 236 |
237 void ThreadInfo::FillCPUContext(RawContextCPU* out) const { | 237 void ThreadInfo::FillCPUContext(RawContextCPU* out) const { |
| 238 #if _MIPS_SIM == _ABI64 |
| 239 out->context_flags = MD_CONTEXT_MIPS64_FULL; |
| 240 #elif _MIPS_SIM == _ABIO32 |
238 out->context_flags = MD_CONTEXT_MIPS_FULL; | 241 out->context_flags = MD_CONTEXT_MIPS_FULL; |
| 242 #else |
| 243 # error "This mips ABI is currently not supported (n32)" |
| 244 #endif |
239 | 245 |
240 for (int i = 0; i < MD_CONTEXT_MIPS_GPR_COUNT; ++i) | 246 for (int i = 0; i < MD_CONTEXT_MIPS_GPR_COUNT; ++i) |
241 out->iregs[i] = mcontext.gregs[i]; | 247 out->iregs[i] = mcontext.gregs[i]; |
242 | 248 |
243 out->mdhi = mcontext.mdhi; | 249 out->mdhi = mcontext.mdhi; |
244 out->mdlo = mcontext.mdlo; | 250 out->mdlo = mcontext.mdlo; |
245 out->dsp_control = mcontext.dsp; | 251 out->dsp_control = mcontext.dsp; |
246 | 252 |
247 out->hi[0] = mcontext.hi1; | 253 out->hi[0] = mcontext.hi1; |
248 out->lo[0] = mcontext.lo1; | 254 out->lo[0] = mcontext.lo1; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 *size = sizeof(mcontext.fpregs); | 296 *size = sizeof(mcontext.fpregs); |
291 #else | 297 #else |
292 if (fp_regs) | 298 if (fp_regs) |
293 *fp_regs = &fpregs; | 299 *fp_regs = &fpregs; |
294 if (size) | 300 if (size) |
295 *size = sizeof(fpregs); | 301 *size = sizeof(fpregs); |
296 #endif | 302 #endif |
297 } | 303 } |
298 | 304 |
299 } // namespace google_breakpad | 305 } // namespace google_breakpad |
OLD | NEW |