10#include "lldb/Host/Config.h"
14#include <sys/utsname.h>
31#define MAP_PRIVATE 0x0002
32#define MAP_ANON 0x1000
45 LLDB_LOG(log,
"force = {0}, arch=({1}, {2})", force,
46 arch ? arch->GetArchitectureName() :
"<null>",
47 arch ? arch->GetTriple().getTriple() :
"<null>");
50 if (!create && arch && arch->IsValid()) {
51 const llvm::Triple &triple = arch->GetTriple();
52 switch (triple.getOS()) {
53 case llvm::Triple::OpenBSD:
57#if defined(__OpenBSD__)
60 case llvm::Triple::OSType::UnknownOS:
61 create = !arch->TripleOSWasSpecified();
68 LLDB_LOG(log,
"create = {0}", create);
77 return "Local OpenBSD user platform plug-in.";
78 return "Remote OpenBSD user platform plug-in.";
85#if defined(__OpenBSD__)
87 default_platform_sp->SetSystemArchitecture(HostInfo::GetArchitecture());
116 llvm::Triple::aarch64, llvm::Triple::arm},
117 llvm::Triple::OpenBSD);
141 strm.
Printf(
" Kernel: %s\n", un.sysname);
142 strm.
Printf(
" Release: %s\n", un.release);
143 strm.
Printf(
" Version: %s\n", un.version);
159 unsigned prot,
unsigned flags,
161 uint64_t flags_platform = 0;
168 MmapArgList args({addr, length, prot, flags_platform, fd, offset});
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
#define LLDB_PLUGIN_DEFINE(PluginName)
An architecture specification class.
A uniqued constant string class.
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
llvm::SmallVector< lldb::addr_t, 6 > MmapArgList
std::shared_ptr< lldb_private::Platform > PlatformSP