/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
Line | Count | Source (jump to first uncovered line) |
1 | | //===-- PlatformNetBSD.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_NETBSD_PLATFORMNETBSD_H |
10 | | #define LLDB_SOURCE_PLUGINS_PLATFORM_NETBSD_PLATFORMNETBSD_H |
11 | | |
12 | | #include "Plugins/Platform/POSIX/PlatformPOSIX.h" |
13 | | #include "Plugins/TypeSystem/Clang/TypeSystemClang.h" |
14 | | |
15 | | namespace lldb_private { |
16 | | namespace platform_netbsd { |
17 | | |
18 | | class PlatformNetBSD : public PlatformPOSIX { |
19 | | public: |
20 | | PlatformNetBSD(bool is_host); |
21 | | |
22 | | static void Initialize(); |
23 | | |
24 | | static void Terminate(); |
25 | | |
26 | | // lldb_private::PluginInterface functions |
27 | | static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch); |
28 | | |
29 | 3.93k | static llvm::StringRef GetPluginNameStatic(bool is_host) { |
30 | 3.93k | return is_host ? Platform::GetHostPlatformName()0 : "remote-netbsd"; |
31 | 3.93k | } |
32 | | |
33 | | static llvm::StringRef GetPluginDescriptionStatic(bool is_host); |
34 | | |
35 | 3 | llvm::StringRef GetPluginName() override { |
36 | 3 | return GetPluginNameStatic(IsHost()); |
37 | 3 | } |
38 | | |
39 | | // lldb_private::Platform functions |
40 | 0 | llvm::StringRef GetDescription() override { |
41 | 0 | return GetPluginDescriptionStatic(IsHost()); |
42 | 0 | } |
43 | | |
44 | | void GetStatus(Stream &strm) override; |
45 | | |
46 | | std::vector<ArchSpec> |
47 | | GetSupportedArchitectures(const ArchSpec &process_host_arch) override; |
48 | | |
49 | | uint32_t GetResumeCountForLaunchInfo(ProcessLaunchInfo &launch_info) override; |
50 | | |
51 | | bool CanDebugProcess() override; |
52 | | |
53 | | void CalculateTrapHandlerSymbolNames() override; |
54 | | |
55 | | MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr, |
56 | | lldb::addr_t length, unsigned prot, |
57 | | unsigned flags, lldb::addr_t fd, |
58 | | lldb::addr_t offset) override; |
59 | | |
60 | | CompilerType GetSiginfoType(const llvm::Triple &triple) override; |
61 | | |
62 | | std::vector<ArchSpec> m_supported_architectures; |
63 | | |
64 | | private: |
65 | | std::mutex m_mutex; |
66 | | std::shared_ptr<TypeSystemClang> m_type_system; |
67 | | }; |
68 | | |
69 | | } // namespace platform_netbsd |
70 | | } // namespace lldb_private |
71 | | |
72 | | #endif // LLDB_SOURCE_PLUGINS_PLATFORM_NETBSD_PLATFORMNETBSD_H |