Coverage Report

Created: 2022-01-18 06:27

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/Plugins/Platform/Windows/PlatformWindows.h
Line
Count
Source (jump to first uncovered line)
1
//===-- PlatformWindows.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_WINDOWS_PLATFORMWINDOWS_H
10
#define LLDB_SOURCE_PLUGINS_PLATFORM_WINDOWS_PLATFORMWINDOWS_H
11
12
#include "lldb/Target/RemoteAwarePlatform.h"
13
14
namespace lldb_private {
15
16
class PlatformWindows : public RemoteAwarePlatform {
17
public:
18
  PlatformWindows(bool is_host);
19
20
  static void Initialize();
21
22
  static void Terminate();
23
24
  // lldb_private::PluginInterface functions
25
  static lldb::PlatformSP CreateInstance(bool force,
26
                                         const lldb_private::ArchSpec *arch);
27
28
3.44k
  static llvm::StringRef GetPluginNameStatic(bool is_host) {
29
3.44k
    return is_host ? 
Platform::GetHostPlatformName()0
: "remote-windows";
30
3.44k
  }
31
32
  static llvm::StringRef GetPluginDescriptionStatic(bool is_host);
33
34
2
  llvm::StringRef GetPluginName() override {
35
2
    return GetPluginNameStatic(IsHost());
36
2
  }
37
38
  // lldb_private::Platform functions
39
0
  llvm::StringRef GetDescription() override {
40
0
    return GetPluginDescriptionStatic(IsHost());
41
0
  }
42
43
  lldb_private::Status ConnectRemote(lldb_private::Args &args) override;
44
45
  lldb_private::Status DisconnectRemote() override;
46
47
  uint32_t DoLoadImage(lldb_private::Process *process,
48
                       const lldb_private::FileSpec &remote_file,
49
                       const std::vector<std::string> *paths,
50
                       lldb_private::Status &error,
51
                       lldb_private::FileSpec *loaded_path) override;
52
53
  lldb_private::Status UnloadImage(lldb_private::Process *process,
54
                                   uint32_t image_token) override;
55
56
  lldb::ProcessSP DebugProcess(lldb_private::ProcessLaunchInfo &launch_info,
57
                               lldb_private::Debugger &debugger,
58
                               lldb_private::Target &target,
59
                               lldb_private::Status &error) override;
60
61
  lldb::ProcessSP Attach(lldb_private::ProcessAttachInfo &attach_info,
62
                         lldb_private::Debugger &debugger,
63
                         lldb_private::Target *target,
64
                         lldb_private::Status &error) override;
65
66
28
  std::vector<ArchSpec> GetSupportedArchitectures() override {
67
28
    return m_supported_architectures;
68
28
  }
69
70
  void GetStatus(lldb_private::Stream &strm) override;
71
72
  bool CanDebugProcess() override;
73
74
  // FIXME not sure what the _sigtramp equivalent would be on this platform
75
5
  void CalculateTrapHandlerSymbolNames() override {}
76
77
  ConstString GetFullNameForDylib(ConstString basename) override;
78
79
  size_t GetSoftwareBreakpointTrapOpcode(Target &target,
80
                                         BreakpointSite *bp_site) override;
81
82
  std::vector<ArchSpec> m_supported_architectures;
83
84
private:
85
  std::unique_ptr<lldb_private::UtilityFunction>
86
  MakeLoadImageUtilityFunction(lldb_private::ExecutionContext &context,
87
                               lldb_private::Status &status);
88
89
  lldb_private::Status EvaluateLoaderExpression(lldb_private::Process *process,
90
                                                const char *expression,
91
                                                lldb::ValueObjectSP &value);
92
};
93
94
} // namespace lldb_private
95
96
#endif // LLDB_SOURCE_PLUGINS_PLATFORM_WINDOWS_PLATFORMWINDOWS_H