From dcdccf56f24f40d49ef01ca0d67e570813a47a91 Mon Sep 17 00:00:00 2001 From: Thomas Gales Date: Thu, 15 Jun 2023 19:54:26 +0000 Subject: [PATCH] [fuchsia][arm64] Don't query for fp registers Fuchsia devices are failing to read floating point context for ARM because floating point registers are in the vector context for ARM. This CL prevents warning logs from being emitted in this situation. Fixed: fuchsia:129171 Tested: `fx shell crasher` @ 659207de7293cb30 Change-Id: I1d8d928da122aeb1bc4ac66b789cb638969d0fdf Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4617960 Reviewed-by: Joshua Peraza --- snapshot/fuchsia/process_reader_fuchsia.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snapshot/fuchsia/process_reader_fuchsia.cc b/snapshot/fuchsia/process_reader_fuchsia.cc index 5f792838..89aa74d9 100644 --- a/snapshot/fuchsia/process_reader_fuchsia.cc +++ b/snapshot/fuchsia/process_reader_fuchsia.cc @@ -345,6 +345,8 @@ void ProcessReaderFuchsia::InitializeThreads() { } } +// Floating point registers are in the vector context for ARM. +#if !defined(ARCH_CPU_ARM64) zx_thread_state_fp_regs_t fp_regs; status = thread_handles[i].read_state( ZX_THREAD_STATE_FP_REGS, &fp_regs, sizeof(fp_regs)); @@ -354,6 +356,7 @@ void ProcessReaderFuchsia::InitializeThreads() { } else { thread.fp_registers = fp_regs; } +#endif zx_thread_state_vector_regs_t vector_regs; status = thread_handles[i].read_state(