1//===-- PlatformOpenBSD.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_OPENBSD_PLATFORMOPENBSD_H
10#define LLDB_SOURCE_PLUGINS_PLATFORM_OPENBSD_PLATFORMOPENBSD_H
11
12#include "Plugins/Platform/POSIX/PlatformPOSIX.h"
13
14namespace lldb_private {
15namespace platform_openbsd {
16
17class PlatformOpenBSD : public PlatformPOSIX {
18public:
19 PlatformOpenBSD(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 llvm::StringRef GetPluginNameStatic(bool is_host) {
29 return is_host ? Platform::GetHostPlatformName() : "remote-openbsd";
30 }
31
32 static llvm::StringRef GetPluginDescriptionStatic(bool is_host);
33
34 llvm::StringRef GetPluginName() override {
35 return GetPluginNameStatic(is_host: IsHost());
36 }
37
38 // lldb_private::Platform functions
39 llvm::StringRef GetDescription() override {
40 return GetPluginDescriptionStatic(is_host: IsHost());
41 }
42
43 void GetStatus(Stream &strm) override;
44
45 std::vector<ArchSpec>
46 GetSupportedArchitectures(const ArchSpec &process_host_arch) override;
47
48 bool CanDebugProcess() override;
49
50 void CalculateTrapHandlerSymbolNames() override;
51
52 MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr,
53 lldb::addr_t length, unsigned prot,
54 unsigned flags, lldb::addr_t fd,
55 lldb::addr_t offset) override;
56
57 std::vector<ArchSpec> m_supported_architectures;
58};
59
60} // namespace platform_openbsd
61} // namespace lldb_private
62
63#endif // LLDB_SOURCE_PLUGINS_PLATFORM_OPENBSD_PLATFORMOPENBSD_H
64

source code of lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.h