Fix Mac build

f617814017
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 <mark@chromium.org>
This commit is contained in:
Leonard Grey 2023-02-07 15:44:24 -05:00
parent bc25ffb613
commit 5687ac51ca

View File

@ -763,6 +763,8 @@ bool MinidumpProcessor::GetProcessCreateTime(Minidump* dump,
return true; return true;
} }
#ifdef __linux__
static bool IsCanonicalAddress(uint64_t address) { static bool IsCanonicalAddress(uint64_t address) {
uint64_t sign_bit = (address >> 63) & 1; uint64_t sign_bit = (address >> 63) & 1;
for (int shift = 48; shift < 63; ++shift) { for (int shift = 48; shift < 63; ++shift) {
@ -773,7 +775,6 @@ static bool IsCanonicalAddress(uint64_t address) {
return true; return true;
} }
#ifdef __linux__
static void CalculateFaultAddressFromInstruction(Minidump* dump, static void CalculateFaultAddressFromInstruction(Minidump* dump,
uint64_t* address) { uint64_t* address) {
MinidumpException* exception = dump->GetException(); MinidumpException* exception = dump->GetException();