From 84ef87ef510942883b99ef8d7a0e292945ff8696 Mon Sep 17 00:00:00 2001 From: Tom Tan Date: Tue, 5 Feb 2019 11:13:29 -0800 Subject: [PATCH] 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 Commit-Queue: Mark Mentovai --- handler/win/crashy_test_program.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handler/win/crashy_test_program.cc b/handler/win/crashy_test_program.cc index 990929bf..9c8adbbd 100644 --- a/handler/win/crashy_test_program.cc +++ b/handler/win/crashy_test_program.cc @@ -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(g_test_memory); #elif defined(ARCH_CPU_X86) context.Edi = reinterpret_cast(g_test_memory); +#elif defined(ARCH_CPU_ARM64) + context.X17 = reinterpret_cast(g_test_memory); #endif if (!SetThreadContext(thread, &context)) { PLOG(ERROR) << "SetThreadContext";