From 17832a58a43e8456ec04d978d021bb3238b8e8d6 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Sun, 8 Feb 2015 16:18:46 +0000 Subject: [PATCH] Use FreeBSD ProcessMonitor.h on FreeBSD There's an unfortunate layering issue between LLDB's Process/POSIX and Process/{FreeBSD,Linux}, exposed by a refactoring in upstream revision 218568. Work around it by adding explicit #if defined(__FreeBSD__) guards to include the correct header. --- .../tools/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp | 4 ++++ .../tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp | 4 ++++ .../POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp | 4 ++++ .../POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp b/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp index 1057585e1b2a..e31f9fea3d68 100644 --- a/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp +++ b/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp @@ -31,7 +31,11 @@ #include "POSIXThread.h" #include "ProcessPOSIX.h" #include "ProcessPOSIXLog.h" +#if defined(__FreeBSD__) +#include "Plugins/Process/FreeBSD/ProcessMonitor.h" +#else #include "Plugins/Process/Linux/ProcessMonitor.h" +#endif #include "RegisterContextPOSIXProcessMonitor_arm64.h" #include "RegisterContextPOSIXProcessMonitor_mips64.h" #include "RegisterContextPOSIXProcessMonitor_powerpc.h" diff --git a/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp b/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp index 0e5ab5a8d8b1..94c318c9feaf 100644 --- a/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp +++ b/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp @@ -29,7 +29,11 @@ #include "ProcessPOSIX.h" #include "ProcessPOSIXLog.h" #include "Plugins/Process/Utility/InferiorCallPOSIX.h" +#if defined(__FreeBSD__) +#include "Plugins/Process/FreeBSD/ProcessMonitor.h" +#else #include "Plugins/Process/Linux/ProcessMonitor.h" +#endif #include "POSIXThread.h" using namespace lldb; diff --git a/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp b/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp index ec34d9e28161..06f2bd2cf982 100644 --- a/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp +++ b/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp @@ -13,7 +13,11 @@ #include "Plugins/Process/Utility/RegisterContextPOSIX_arm64.h" #include "ProcessPOSIX.h" #include "RegisterContextPOSIXProcessMonitor_arm64.h" +#if defined(__FreeBSD__) +#include "Plugins/Process/FreeBSD/ProcessMonitor.h" +#else #include "Plugins/Process/Linux/ProcessMonitor.h" +#endif #define REG_CONTEXT_SIZE (GetGPRSize()) diff --git a/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp b/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp index 6717d20da056..f5be9abded80 100644 --- a/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp +++ b/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp @@ -13,7 +13,11 @@ #include "Plugins/Process/Utility/RegisterContextPOSIX_mips64.h" #include "ProcessPOSIX.h" #include "RegisterContextPOSIXProcessMonitor_mips64.h" +#if defined(__FreeBSD__) +#include "Plugins/Process/FreeBSD/ProcessMonitor.h" +#else #include "Plugins/Process/Linux/ProcessMonitor.h" +#endif using namespace lldb_private; using namespace lldb;