Changeset View
Changeset View
Standalone View
Standalone View
tools/lldb-server/lldb-gdbserver.cpp
Show All 33 Lines | |||||
#include "lldb/Utility/Status.h" | #include "lldb/Utility/Status.h" | ||||
#include "llvm/ADT/StringRef.h" | #include "llvm/ADT/StringRef.h" | ||||
#include "llvm/Support/Errno.h" | #include "llvm/Support/Errno.h" | ||||
#if defined(__linux__) | #if defined(__linux__) | ||||
#include "Plugins/Process/Linux/NativeProcessLinux.h" | #include "Plugins/Process/Linux/NativeProcessLinux.h" | ||||
#elif defined(__NetBSD__) | #elif defined(__NetBSD__) | ||||
#include "Plugins/Process/NetBSD/NativeProcessNetBSD.h" | #include "Plugins/Process/NetBSD/NativeProcessNetBSD.h" | ||||
#elif defined(_WIN32) | |||||
#include "Plugins/Process/Windows/Common/NativeProcessWindows.h" | |||||
#endif | #endif | ||||
#ifndef LLGS_PROGRAM_NAME | #ifndef LLGS_PROGRAM_NAME | ||||
#define LLGS_PROGRAM_NAME "lldb-server" | #define LLGS_PROGRAM_NAME "lldb-server" | ||||
#endif | #endif | ||||
#ifndef LLGS_VERSION_STR | #ifndef LLGS_VERSION_STR | ||||
#define LLGS_VERSION_STR "local_build" | #define LLGS_VERSION_STR "local_build" | ||||
#endif | #endif | ||||
using namespace llvm; | using namespace llvm; | ||||
using namespace lldb; | using namespace lldb; | ||||
using namespace lldb_private; | using namespace lldb_private; | ||||
using namespace lldb_private::lldb_server; | using namespace lldb_private::lldb_server; | ||||
using namespace lldb_private::process_gdb_remote; | using namespace lldb_private::process_gdb_remote; | ||||
namespace { | namespace { | ||||
#if defined(__linux__) | #if defined(__linux__) | ||||
typedef process_linux::NativeProcessLinux::Factory NativeProcessFactory; | typedef process_linux::NativeProcessLinux::Factory NativeProcessFactory; | ||||
#elif defined(__NetBSD__) | #elif defined(__NetBSD__) | ||||
typedef process_netbsd::NativeProcessNetBSD::Factory NativeProcessFactory; | typedef process_netbsd::NativeProcessNetBSD::Factory NativeProcessFactory; | ||||
#elif defined(_WIN32) | |||||
typedef NativeProcessWindows::Factory NativeProcessFactory; | |||||
#else | #else | ||||
// Dummy implementation to make sure the code compiles | // Dummy implementation to make sure the code compiles | ||||
class NativeProcessFactory : public NativeProcessProtocol::Factory { | class NativeProcessFactory : public NativeProcessProtocol::Factory { | ||||
public: | public: | ||||
llvm::Expected<std::unique_ptr<NativeProcessProtocol>> | llvm::Expected<std::unique_ptr<NativeProcessProtocol>> | ||||
Launch(ProcessLaunchInfo &launch_info, | Launch(ProcessLaunchInfo &launch_info, | ||||
NativeProcessProtocol::NativeDelegate &delegate, | NativeProcessProtocol::NativeDelegate &delegate, | ||||
MainLoop &mainloop) const override { | MainLoop &mainloop) const override { | ||||
▲ Show 20 Lines • Show All 475 Lines • Show Last 20 Lines |