From 5687ac51caab4f7100ddcb9dea92ca6bd6be66e7 Mon Sep 17 00:00:00 2001 From: Leonard Grey Date: Tue, 7 Feb 2023 15:44:24 -0500 Subject: [PATCH] Fix Mac build https://chromium.googlesource.com/breakpad/breakpad/+/f6178140175800cc6385a151e7f23d6e5c4968ca missed marking `IsCanonicalAddress` Linux-only. Bug: None Change-Id: Ia936db4b5541f22abcc884d410e7eae3818b4c0f Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4227418 Reviewed-by: Mark Mentovai --- src/processor/minidump_processor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/processor/minidump_processor.cc b/src/processor/minidump_processor.cc index d72926cb..0073ae4e 100644 --- a/src/processor/minidump_processor.cc +++ b/src/processor/minidump_processor.cc @@ -763,6 +763,8 @@ bool MinidumpProcessor::GetProcessCreateTime(Minidump* dump, return true; } +#ifdef __linux__ + static bool IsCanonicalAddress(uint64_t address) { uint64_t sign_bit = (address >> 63) & 1; for (int shift = 48; shift < 63; ++shift) { @@ -773,7 +775,6 @@ static bool IsCanonicalAddress(uint64_t address) { return true; } -#ifdef __linux__ static void CalculateFaultAddressFromInstruction(Minidump* dump, uint64_t* address) { MinidumpException* exception = dump->GetException();