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

Side by Side Diff: src/client/linux/dump_writer_common/ucontext_reader.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) 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { 213 uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
214 return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]; 214 return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP];
215 } 215 }
216 216
217 uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { 217 uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
218 return uc->uc_mcontext.pc; 218 return uc->uc_mcontext.pc;
219 } 219 }
220 220
221 void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { 221 void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
222 #if _MIPS_SIM == _ABI64
223 out->context_flags = MD_CONTEXT_MIPS64_FULL;
224 #else
222 out->context_flags = MD_CONTEXT_MIPS_FULL; 225 out->context_flags = MD_CONTEXT_MIPS_FULL;
226 #endif
223 227
224 for (int i = 0; i < MD_CONTEXT_MIPS_GPR_COUNT; ++i) 228 for (int i = 0; i < MD_CONTEXT_MIPS_GPR_COUNT; ++i)
225 out->iregs[i] = uc->uc_mcontext.gregs[i]; 229 out->iregs[i] = uc->uc_mcontext.gregs[i];
226 230
227 out->mdhi = uc->uc_mcontext.mdhi; 231 out->mdhi = uc->uc_mcontext.mdhi;
228 out->mdlo = uc->uc_mcontext.mdlo; 232 out->mdlo = uc->uc_mcontext.mdlo;
229 233
230 out->hi[0] = uc->uc_mcontext.hi1; 234 out->hi[0] = uc->uc_mcontext.hi1;
231 out->hi[1] = uc->uc_mcontext.hi2; 235 out->hi[1] = uc->uc_mcontext.hi2;
232 out->hi[2] = uc->uc_mcontext.hi3; 236 out->hi[2] = uc->uc_mcontext.hi3;
(...skipping 11 matching lines...) Expand all
244 out->float_save.regs[i] = uc->uc_mcontext.fpregs.fp_r.fp_dregs[i]; 248 out->float_save.regs[i] = uc->uc_mcontext.fpregs.fp_r.fp_dregs[i];
245 249
246 out->float_save.fpcsr = uc->uc_mcontext.fpc_csr; 250 out->float_save.fpcsr = uc->uc_mcontext.fpc_csr;
247 #if _MIPS_SIM == _ABIO32 251 #if _MIPS_SIM == _ABIO32
248 out->float_save.fir = uc->uc_mcontext.fpc_eir; // Unused. 252 out->float_save.fir = uc->uc_mcontext.fpc_eir; // Unused.
249 #endif 253 #endif
250 } 254 }
251 #endif 255 #endif
252 256
253 } // namespace google_breakpad 257 } // namespace google_breakpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698