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

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

Issue 1268023003: Fix breakpad for arm on arm64 (Closed) Base URL: https://chromium.googlesource.com/external/google-breakpad/src.git@master
Patch Set: Created 5 years, 4 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) 2012, Google Inc. 1 // Copyright (c) 2012, 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) { 199 if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) {
200 return false; 200 return false;
201 } 201 }
202 #else // PTRACE_GETREGSET 202 #else // PTRACE_GETREGSET
203 void* gp_addr; 203 void* gp_addr;
204 info->GetGeneralPurposeRegisters(&gp_addr, NULL); 204 info->GetGeneralPurposeRegisters(&gp_addr, NULL);
205 if (sys_ptrace(PTRACE_GETREGS, tid, NULL, gp_addr) == -1) { 205 if (sys_ptrace(PTRACE_GETREGS, tid, NULL, gp_addr) == -1) {
206 return false; 206 return false;
207 } 207 }
208 208
209 void* fp_addr; 209 void* fp_addr;
Lei Zhang 2015/08/04 00:11:33 - I would just skip this entire block on Android +
cjhopman 2015/08/04 23:28:45 Done.
210 info->GetFloatingPointRegisters(&fp_addr, NULL); 210 info->GetFloatingPointRegisters(&fp_addr, NULL);
211 if (sys_ptrace(PTRACE_GETFPREGS, tid, NULL, fp_addr) == -1) { 211 if (sys_ptrace(PTRACE_GETFPREGS, tid, NULL, fp_addr) == -1) {
212 #if defined(__ANDROID__) && defined(__ARM_EABI__)
213 // When running an arm build on an arm64 device, attempting to get the
214 // floating point registers fails with EIO. Ignore that error.
215 if (errno != EIO) {
216 return false;
217 }
218 #else
212 return false; 219 return false;
220 #endif
213 } 221 }
214 #endif 222 #endif
215 223
216 #if defined(__i386) 224 #if defined(__i386)
217 #if !defined(bit_FXSAVE) // e.g. Clang 225 #if !defined(bit_FXSAVE) // e.g. Clang
218 #define bit_FXSAVE bit_FXSR 226 #define bit_FXSAVE bit_FXSR
219 #endif 227 #endif
220 // Detect if the CPU supports the FXSAVE/FXRSTOR instructions 228 // Detect if the CPU supports the FXSAVE/FXRSTOR instructions
221 int eax, ebx, ecx, edx; 229 int eax, ebx, ecx, edx;
222 __cpuid(1, eax, ebx, ecx, edx); 230 __cpuid(1, eax, ebx, ecx, edx);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 348 }
341 } 349 }
342 dir_reader->PopEntry(); 350 dir_reader->PopEntry();
343 } 351 }
344 352
345 sys_close(fd); 353 sys_close(fd);
346 return true; 354 return true;
347 } 355 }
348 356
349 } // namespace google_breakpad 357 } // 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