From 90da3ce3a92874d0050f4d26d082570f822bcb57 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 18 May 2018 12:54:21 +0000 Subject: [PATCH] Add back #ifdef __APPLE__ to RegisterContextDarwin_xxx::NumSupportedHardwareWatchpoints It turns out these class still contained some os-specific functionality, but I did not notice that originally, as it was #ifdef arm(64). This adds back the __APPLE__ condition to these particular functions, unbreaking arm builds on other OSs. llvm-svn: 332710 --- .../Plugins/Process/Utility/RegisterContextDarwin_arm.cpp | 4 ++-- .../Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp index f26a64ad9571..e57525ed14d5 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp @@ -1505,7 +1505,7 @@ uint32_t RegisterContextDarwin_arm::ConvertRegisterKindToRegisterNumber( } uint32_t RegisterContextDarwin_arm::NumSupportedHardwareBreakpoints() { -#if defined(__arm__) +#if defined(__APPLE__) && defined(__arm__) // Set the init value to something that will let us know that we need to // autodetect how many breakpoints are supported dynamically... static uint32_t g_num_supported_hw_breakpoints = UINT32_MAX; @@ -1637,7 +1637,7 @@ bool RegisterContextDarwin_arm::ClearHardwareBreakpoint(uint32_t hw_index) { } uint32_t RegisterContextDarwin_arm::NumSupportedHardwareWatchpoints() { -#if defined(__arm__) +#if defined(__APPLE__) && defined(__arm__) // Set the init value to something that will let us know that we need to // autodetect how many watchpoints are supported dynamically... static uint32_t g_num_supported_hw_watchpoints = UINT32_MAX; diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp index 2a2bd8d67dae..15980c092077 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp @@ -915,7 +915,7 @@ uint32_t RegisterContextDarwin_arm64::ConvertRegisterKindToRegisterNumber( } uint32_t RegisterContextDarwin_arm64::NumSupportedHardwareWatchpoints() { -#if defined(__arm64__) || defined(__aarch64__) +#if defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) // autodetect how many watchpoints are supported dynamically... static uint32_t g_num_supported_hw_watchpoints = UINT32_MAX; if (g_num_supported_hw_watchpoints == UINT32_MAX) {