mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-14 17:30:09 +08:00
Fix arm64 CONTEXT for crashy_test_program
Bug: chromium:893460 Change-Id: I0bd47521d68aa9477e32104986bd7aeb1d4e2738 Reviewed-on: https://chromium-review.googlesource.com/c/1454820 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
f66a125cd5
commit
84ef87ef51
@ -101,7 +101,7 @@ DWORD WINAPI NullThreadProc(void* param) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Creates a suspended background thread, and sets EDI/RDI to point at
|
||||
// Creates a suspended background thread, and sets EDI/RDI/X17 to point at
|
||||
// g_test_memory so we can confirm it's available in the minidump.
|
||||
bool CreateThreadWithRegisterPointingToTestMemory() {
|
||||
HANDLE thread = CreateThread(
|
||||
@ -121,6 +121,8 @@ bool CreateThreadWithRegisterPointingToTestMemory() {
|
||||
context.Rdi = reinterpret_cast<DWORD64>(g_test_memory);
|
||||
#elif defined(ARCH_CPU_X86)
|
||||
context.Edi = reinterpret_cast<DWORD>(g_test_memory);
|
||||
#elif defined(ARCH_CPU_ARM64)
|
||||
context.X17 = reinterpret_cast<DWORD64>(g_test_memory);
|
||||
#endif
|
||||
if (!SetThreadContext(thread, &context)) {
|
||||
PLOG(ERROR) << "SetThreadContext";
|
||||
|
Loading…
x
Reference in New Issue
Block a user