/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.h
Line | Count | Source (jump to first uncovered line) |
1 | | //===-- PlatformQemuUser.h ------------------------------------------------===// |
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_QEMUUSER_PLATFORMQEMUUSER_H |
10 | | #define LLDB_SOURCE_PLUGINS_PLATFORM_QEMUUSER_PLATFORMQEMUUSER_H |
11 | | |
12 | | #include "lldb/Host/Host.h" |
13 | | #include "lldb/Host/HostInfo.h" |
14 | | #include "lldb/Target/Platform.h" |
15 | | |
16 | | namespace lldb_private { |
17 | | |
18 | | class PlatformQemuUser : public Platform { |
19 | | public: |
20 | | static void Initialize(); |
21 | | static void Terminate(); |
22 | | |
23 | 13.8k | static llvm::StringRef GetPluginNameStatic() { return "qemu-user"; } |
24 | | static llvm::StringRef GetPluginDescriptionStatic(); |
25 | | |
26 | 11 | llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); } |
27 | 0 | llvm::StringRef GetDescription() override { |
28 | 0 | return GetPluginDescriptionStatic(); |
29 | 0 | } |
30 | | |
31 | 0 | UserIDResolver &GetUserIDResolver() override { |
32 | 0 | return HostInfo::GetUserIDResolver(); |
33 | 0 | } |
34 | | |
35 | | std::vector<ArchSpec> |
36 | | GetSupportedArchitectures(const ArchSpec &process_host_arch) override; |
37 | | |
38 | | lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info, |
39 | | Debugger &debugger, Target &target, |
40 | | Status &error) override; |
41 | | |
42 | | lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger, |
43 | 0 | Target *target, Status &status) override { |
44 | 0 | status.SetErrorString("Not supported"); |
45 | 0 | return nullptr; |
46 | 0 | } |
47 | | |
48 | | uint32_t FindProcesses(const ProcessInstanceInfoMatch &match_info, |
49 | 1 | ProcessInstanceInfoList &proc_infos) override { |
50 | 1 | return 0; |
51 | 1 | } |
52 | | |
53 | | bool GetProcessInfo(lldb::pid_t pid, |
54 | 8 | ProcessInstanceInfo &proc_info) override { |
55 | 8 | return false; |
56 | 8 | } |
57 | | |
58 | 2 | bool IsConnected() const override { return true; } |
59 | | |
60 | 0 | void CalculateTrapHandlerSymbolNames() override {} |
61 | | |
62 | | Environment GetEnvironment() override; |
63 | | |
64 | | MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr, |
65 | | lldb::addr_t length, unsigned prot, |
66 | | unsigned flags, lldb::addr_t fd, |
67 | 0 | lldb::addr_t offset) override { |
68 | 0 | return Platform::GetHostPlatform()->GetMmapArgumentList( |
69 | 0 | arch, addr, length, prot, flags, fd, offset); |
70 | 0 | } |
71 | | |
72 | | private: |
73 | | static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch); |
74 | | static void DebuggerInitialize(Debugger &debugger); |
75 | | |
76 | 15 | PlatformQemuUser() : Platform(/*is_host=*/true) {} |
77 | | }; |
78 | | |
79 | | } // namespace lldb_private |
80 | | |
81 | | #endif // LLDB_SOURCE_PLUGINS_PLATFORM_QEMUUSER_PLATFORMQEMUUSER_H |