10b57cec5SDimitry Andric //===-- PlatformFreeBSD.h ---------------------------------------*- C++ -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 95ffd83dbSDimitry Andric #ifndef LLDB_SOURCE_PLUGINS_PLATFORM_FREEBSD_PLATFORMFREEBSD_H 105ffd83dbSDimitry Andric #define LLDB_SOURCE_PLUGINS_PLATFORM_FREEBSD_PLATFORMFREEBSD_H 110b57cec5SDimitry Andric 120b57cec5SDimitry Andric #include "Plugins/Platform/POSIX/PlatformPOSIX.h" 1304eeddc0SDimitry Andric #include "Plugins/TypeSystem/Clang/TypeSystemClang.h" 140b57cec5SDimitry Andric 150b57cec5SDimitry Andric namespace lldb_private { 160b57cec5SDimitry Andric namespace platform_freebsd { 170b57cec5SDimitry Andric 180b57cec5SDimitry Andric class PlatformFreeBSD : public PlatformPOSIX { 190b57cec5SDimitry Andric public: 200b57cec5SDimitry Andric PlatformFreeBSD(bool is_host); 210b57cec5SDimitry Andric 220b57cec5SDimitry Andric static void Initialize(); 230b57cec5SDimitry Andric 240b57cec5SDimitry Andric static void Terminate(); 250b57cec5SDimitry Andric 260b57cec5SDimitry Andric // lldb_private::PluginInterface functions 270b57cec5SDimitry Andric static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch); 280b57cec5SDimitry Andric GetPluginNameStatic(bool is_host)29349cc55cSDimitry Andric static llvm::StringRef GetPluginNameStatic(bool is_host) { 30349cc55cSDimitry Andric return is_host ? Platform::GetHostPlatformName() : "remote-freebsd"; 31349cc55cSDimitry Andric } 320b57cec5SDimitry Andric 33349cc55cSDimitry Andric static llvm::StringRef GetPluginDescriptionStatic(bool is_host); 340b57cec5SDimitry Andric GetPluginName()35349cc55cSDimitry Andric llvm::StringRef GetPluginName() override { 36349cc55cSDimitry Andric return GetPluginNameStatic(IsHost()); 37349cc55cSDimitry Andric } 380b57cec5SDimitry Andric 390b57cec5SDimitry Andric // lldb_private::Platform functions GetDescription()40349cc55cSDimitry Andric llvm::StringRef GetDescription() override { 410b57cec5SDimitry Andric return GetPluginDescriptionStatic(IsHost()); 420b57cec5SDimitry Andric } 430b57cec5SDimitry Andric 440b57cec5SDimitry Andric void GetStatus(Stream &strm) override; 450b57cec5SDimitry Andric 4681ad6265SDimitry Andric std::vector<ArchSpec> 4781ad6265SDimitry Andric GetSupportedArchitectures(const ArchSpec &process_host_arch) override; 480b57cec5SDimitry Andric 490b57cec5SDimitry Andric bool CanDebugProcess() override; 500b57cec5SDimitry Andric 510b57cec5SDimitry Andric void CalculateTrapHandlerSymbolNames() override; 520b57cec5SDimitry Andric 530b57cec5SDimitry Andric MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr, 540b57cec5SDimitry Andric lldb::addr_t length, unsigned prot, 550b57cec5SDimitry Andric unsigned flags, lldb::addr_t fd, 560b57cec5SDimitry Andric lldb::addr_t offset) override; 57349cc55cSDimitry Andric 5804eeddc0SDimitry Andric CompilerType GetSiginfoType(const llvm::Triple &triple) override; 5904eeddc0SDimitry Andric 60349cc55cSDimitry Andric std::vector<ArchSpec> m_supported_architectures; 6104eeddc0SDimitry Andric 6204eeddc0SDimitry Andric private: 63*bdd1243dSDimitry Andric std::mutex m_mutex; 64*bdd1243dSDimitry Andric std::shared_ptr<TypeSystemClang> m_type_system; 650b57cec5SDimitry Andric }; 660b57cec5SDimitry Andric 670b57cec5SDimitry Andric } // namespace platform_freebsd 680b57cec5SDimitry Andric } // namespace lldb_private 690b57cec5SDimitry Andric 705ffd83dbSDimitry Andric #endif // LLDB_SOURCE_PLUGINS_PLATFORM_FREEBSD_PLATFORMFREEBSD_H 71