1 //===-- PlatformLinux.h -----------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLDB_SOURCE_PLUGINS_PLATFORM_LINUX_PLATFORMLINUX_H 10 #define LLDB_SOURCE_PLUGINS_PLATFORM_LINUX_PLATFORMLINUX_H 11 12 #include "Plugins/Platform/POSIX/PlatformPOSIX.h" 13 14 namespace lldb_private { 15 namespace platform_linux { 16 17 class PlatformLinux : public PlatformPOSIX { 18 public: 19 PlatformLinux(bool is_host); 20 21 static void Initialize(); 22 23 static void Terminate(); 24 25 // lldb_private::PluginInterface functions 26 static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch); 27 28 static ConstString GetPluginNameStatic(bool is_host); 29 30 static const char *GetPluginDescriptionStatic(bool is_host); 31 32 ConstString GetPluginName() override; 33 34 // lldb_private::Platform functions 35 const char *GetDescription() override { 36 return GetPluginDescriptionStatic(IsHost()); 37 } 38 39 void GetStatus(Stream &strm) override; 40 41 bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override; 42 43 uint32_t GetResumeCountForLaunchInfo(ProcessLaunchInfo &launch_info) override; 44 45 bool CanDebugProcess() override; 46 47 void CalculateTrapHandlerSymbolNames() override; 48 49 MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr, 50 lldb::addr_t length, unsigned prot, 51 unsigned flags, lldb::addr_t fd, 52 lldb::addr_t offset) override; 53 }; 54 55 } // namespace platform_linux 56 } // namespace lldb_private 57 58 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_LINUX_PLATFORMLINUX_H 59